mirror of
https://github.com/starr-dusT/dotfiles.git
synced 2025-02-19 19:27:31 -08:00
nixos :(
This commit is contained in:
parent
ed8ffcf287
commit
64eee2b903
@ -1,4 +1,5 @@
|
||||
[Default Applications]
|
||||
inode/directory=pcmanfm.desktop;
|
||||
text/html=firefox.desktop;
|
||||
x-scheme-handler/http=firefox.desktop;
|
||||
x-scheme-handler/https=firefox.desktop;
|
||||
|
@ -122,8 +122,8 @@ for_window [class="discord"] move container to workspace $tag8
|
||||
# [p]ower commands
|
||||
bindsym $mod+p mode $mode_power
|
||||
mode $mode_power {
|
||||
bindsym s exec loginctl poweroff
|
||||
bindsym r exec loginctl reboot
|
||||
bindsym s exec shutdown now
|
||||
bindsym r exec reboot
|
||||
bindsym Escape mode default
|
||||
}
|
||||
|
||||
@ -205,7 +205,7 @@ bindsym $mod+o mode open
|
||||
mode open {
|
||||
bindsym b exec firefox, $e
|
||||
bindsym s exec steam, $e
|
||||
bindsym d exec flatpak run com.discordapp.Discord, $e
|
||||
bindsym d exec discord, $e
|
||||
bindsym Escape mode default
|
||||
}
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
# You should see changes to the status bar after saving this script.
|
||||
|
||||
# Uptime
|
||||
uptime_formatted=$(uptime | cut -d ',' -f1 | cut -d ' ' -f7)
|
||||
uptime_formatted=$(uptime | cut -d ',' -f1 | rev | cut -d ' ' -f1 | rev)
|
||||
|
||||
# Date
|
||||
date_formatted=$(date "+%a %F %H:%M")
|
||||
@ -30,7 +30,20 @@ else
|
||||
fi
|
||||
|
||||
#bluetooth=$(bluetoothctl devices | cut -f2 -d' ' | while read uuid; do bluetoothctl info $uuid; done | grep -e "Name\|Connected: yes" | grep -B1 "yes" | head -n 1 | cut -d\ -f2-)
|
||||
bluetooth="a"
|
||||
bluetooth="🫐"
|
||||
|
||||
# Network usage
|
||||
r1=`cat /sys/class/net/{{ .network_interface }}/statistics/rx_bytes`
|
||||
t1=`cat /sys/class/net/{{ .network_interface }}/statistics/tx_bytes`
|
||||
sleep 1
|
||||
r2=`cat /sys/class/net/{{ .network_interface }}/statistics/rx_bytes`
|
||||
t2=`cat /sys/class/net/{{ .network_interface }}/statistics/tx_bytes`
|
||||
tx=`expr $t2 - $t1`
|
||||
rx=`expr $r2 - $r1`
|
||||
txmb=$(echo "scale = 1; $tx / 128000" | bc | awk '{printf "%05.1f\n", $0}')
|
||||
rxmb=$(echo "scale = 1; $rx / 128000" | bc | awk '{printf "%05.1f\n", $0}')
|
||||
|
||||
|
||||
#<span foreground='#c16b26'>lel</span>
|
||||
echo -e "🫐 $bluetooth | ⬆️ $uptime_formatted | 🔉<span foreground='$volume_color'>$volume%</span> | $gamemode | 🐧 $linux_version | $date_formatted "
|
||||
echo -e "👍 $txmb 👎 $rxmb | ⬆️ $uptime_formatted | 🔉<span foreground='$volume_color'>$volume%</span> | $gamemode | 🐧 $linux_version | $date_formatted "
|
||||
|
@ -13,15 +13,27 @@ move_tabbed = {"h": "focus parent; focus left",
|
||||
"k": "focus left",
|
||||
"l": "focus parent; focus right"}
|
||||
|
||||
move_tabbed_single = {"h": "focus left",
|
||||
"j": "focus right",
|
||||
"k": "focus left",
|
||||
"l": "focus right"}
|
||||
|
||||
i3 = i3ipc.Connection()
|
||||
|
||||
# Get the focused container
|
||||
focused = i3.get_tree().find_focused()
|
||||
|
||||
# Get number of splits (v or h)
|
||||
focused_workspace = focused.workspace()
|
||||
num_splits = sum(1 for con in focused_workspace.descendants() if con.layout == 'splitv' or con.layout == 'splith')
|
||||
|
||||
# Get the layout of the parent container
|
||||
layout = focused.parent.layout
|
||||
|
||||
if layout == "tabbed":
|
||||
i3.command(move_tabbed[sys.argv[1]])
|
||||
if num_splits > 0:
|
||||
i3.command(move_tabbed[sys.argv[1]])
|
||||
else:
|
||||
i3.command(move_tabbed_single[sys.argv[1]])
|
||||
else:
|
||||
i3.command(move_normal[sys.argv[1]])
|
||||
|
54
provision/nixos/flake.lock
generated
54
provision/nixos/flake.lock
generated
@ -1,5 +1,20 @@
|
||||
{
|
||||
"nodes": {
|
||||
"flake-utils": {
|
||||
"locked": {
|
||||
"lastModified": 1642700792,
|
||||
"narHash": "sha256-XqHrk7hFb+zBvRg6Ghl+AZDq03ov6OshJLiSWOoX5es=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "846b2ae0fc4cc943637d3d1def4454213e203cba",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
@ -20,6 +35,28 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"mach-nix": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"pypi-deps-db": "pypi-deps-db"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1681814846,
|
||||
"narHash": "sha256-IMQ1Twf/ozE53CwrunXNlYD3D31xqgz/mZyZG38Ov/Y=",
|
||||
"owner": "DavHau",
|
||||
"repo": "mach-nix",
|
||||
"rev": "8d903072c7b5426d90bc42a008242c76590af916",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "DavHau",
|
||||
"repo": "mach-nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1683408522,
|
||||
@ -36,9 +73,26 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"pypi-deps-db": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1678051695,
|
||||
"narHash": "sha256-kFFP8TN8pEKARtjK9loGdH+TU23ZbHdVLCUdNcufKPs=",
|
||||
"owner": "DavHau",
|
||||
"repo": "pypi-deps-db",
|
||||
"rev": "e00b22ead9d3534ba1c448e1af3076af6b234acf",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "DavHau",
|
||||
"repo": "pypi-deps-db",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"home-manager": "home-manager",
|
||||
"mach-nix": "mach-nix",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
|
@ -7,9 +7,13 @@
|
||||
url = github:nix-community/home-manager;
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
mach-nix= {
|
||||
url = "github:DavHau/mach-nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = inputs @ { self, nixpkgs, home-manager, ... }:
|
||||
outputs = inputs @ { self, nixpkgs, home-manager, mach-nix, ... }:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
pkgs = import nixpkgs {
|
||||
|
@ -69,6 +69,8 @@
|
||||
nerdfonts
|
||||
];
|
||||
|
||||
virtualisation.docker.enable = true;
|
||||
virtualisation.docker.storageDriver = "btrfs";
|
||||
programs.zsh.enable = true;
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users.${user} = {
|
||||
@ -90,6 +92,8 @@
|
||||
mpv
|
||||
pinentry-curses
|
||||
trash-cli
|
||||
bc
|
||||
unzip
|
||||
];
|
||||
|
||||
# Enable user services
|
||||
@ -107,10 +111,7 @@
|
||||
configDir = "/home/tstarr/.config/syncthing";
|
||||
};
|
||||
};
|
||||
virtualisation.docker.rootless = {
|
||||
enable = true;
|
||||
setSocketVariable = true;
|
||||
};
|
||||
|
||||
# Enable the OpenSSH daemon.
|
||||
services.openssh.enable = true;
|
||||
services.pcscd.enable = true;
|
||||
|
@ -41,6 +41,7 @@ in {
|
||||
grim # screenshot functionality
|
||||
wl-clipboard # wl-copy and wl-paste for copy/paste from stdin / stdout
|
||||
mako # notification system developed by swaywm maintainer
|
||||
#dunst
|
||||
wdisplays # tool to configure displays
|
||||
rofi
|
||||
imagemagick
|
||||
|
@ -1,5 +1,5 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [ ./python.nix ./engineering.nix ];
|
||||
imports = [ ./tooling.nix ./python.nix ./engineering.nix ];
|
||||
}
|
||||
|
@ -9,6 +9,6 @@ in {
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
||||
# Install packages
|
||||
environment.systemPackages = with pkgs; [ super-slicer-latest freecad blender ];
|
||||
environment.systemPackages = with pkgs; [ super-slicer freecad blender ];
|
||||
};
|
||||
}
|
||||
|
@ -7,6 +7,8 @@ let
|
||||
my-python-packages = ps: with ps; [
|
||||
virtualenv
|
||||
i3ipc
|
||||
ipython
|
||||
pip
|
||||
];
|
||||
|
||||
in {
|
||||
|
@ -12,6 +12,7 @@ in {
|
||||
environment.systemPackages = with pkgs; [
|
||||
neovim
|
||||
ripgrep
|
||||
tmux
|
||||
tmuxinator
|
||||
];
|
||||
};
|
||||
|
@ -14,7 +14,10 @@ in {
|
||||
|
||||
hardware.steam-hardware.enable = true;
|
||||
|
||||
environment.systemPackages = [ pkgs.steam ];
|
||||
environment.systemPackages = [
|
||||
pkgs.steam
|
||||
pkgs.ryujinx
|
||||
];
|
||||
};
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user