Changes
2 changed files (+19/-24)
-
-
@@ -157,11 +157,11 @@systemd.services.kill-fprintd = { wantedBy = [ "sleep.target" ]; before = [ "sleep.target" ]; # Alternatively I could use a udev rule but it's less transparent and harder to debug # Make sure we kill fprintd first and ignore errors since I suspect fprintd disables USB persist when it quits # Then make the persist file read-only # This solves the race condition where fprintd starts after kill-fprintd right before sleep script = '' # Alternatively I could use a udev rule but it's less transparent and harder to debug serviceConfig.ExecStart = pkgs.writers.writeFish "kill-fprintd" '' ${pkgs.killall}/bin/killall fprintd || true echo 1 > /sys/bus/usb/devices/3-3/power/persist || true chmod 444 /sys/bus/usb/devices/3-3/power/persist
-
@@ -189,31 +189,29 @@# + makes this run as root instead of the btrbk user ExecStartPost = "+" + pkgs.writeShellScript "symlink latest srv" '' + pkgs.writers.writeFish "symlink-latest-srv" '' cd /.snapshots ln -snf $(printf %s\\n srv.* | tail -n1) srv ln -snf (ls | grep srv | tail -n1) srv ''; }; # https://unnamed.website/posts/switch-virtual-keyboard/ systemd.user.services.switch-virtual-keyboard = { wantedBy = [ "default.target" ]; # Yeah I know I'm supposed to be a Fish fan but there's already a Bash script in that post # I've succumbed to the dark side I know script = '' switch() { echo "Starting $1" ${pkgs.kdePackages.kconfig}/bin/kwriteconfig6 --file kwinrc --group Wayland --key InputMethod "/run/current-system/sw/share/applications/$1" busctl --user emit /kwinrc org.kde.kconfig.notify ConfigChanged "a{saay}" 1 Wayland 1 11 73 110 112 117 116 77 101 116 104 111 100 } busctl --user monitor --match "type=signal,interface=org.kde.KWin.TabletModeManager,member=tabletModeChanged" | while read -r line do if [[ $line == *"true"* ]]; then switch com.github.maliit.keyboard.desktop elif [[ $line == *"false"* ]]; then switch fcitx5-wayland-launcher.desktop fi done # https://unnamed.website/posts/switch-virtual-keyboard/ serviceConfig.ExecStart = pkgs.writers.writeFish "switch-virtual-keyboard" '' function switch_virtual_keyboard echo Starting $argv[1] ${pkgs.kdePackages.kconfig}/bin/kwriteconfig6 --file kwinrc --group Wayland --key InputMethod /run/current-system/sw/share/applications/$argv[1] busctl --user emit /kwinrc org.kde.kconfig.notify ConfigChanged a{saay} 1 Wayland 1 11 73 110 112 117 116 77 101 116 104 111 100 end busctl --user monitor --match type=signal,interface=org.kde.KWin.TabletModeManager,member=tabletModeChanged | \ while read -l line if string match -q "*true*" $line switch_virtual_keyboard com.github.maliit.keyboard.desktop else if string match -q "*false*" $line switch_virtual_keyboard fcitx5-wayland-launcher.desktop end end ''; }; }
-
-
-
@@ -9,7 +9,6 @@nix = { # BAD NIX STORE STOP BEING 100GB gc = { # TODO: Does this run properly on XVM? automatic = true; dates = "weekly"; options = "--delete-older-than 7d";
-
@@ -28,14 +27,12 @@experimental-features = [ "nix-command" "flakes" "pipe-operators" ]; }; }; boot = { # I love systemd # TODO: Seems like old kernels aren't cleaned up on XVM # I think deploy-rs should be responsible for doing that initrd.systemd.enable = true; # The default kernel is slightly ancient
-