ctucx.git: nixfiles

ctucx' nixfiles

commit d5a6ecc344d34c3a8da8e81efcbbbb8d6052a0a3
parent d3bbac1e5f6df52ece2fee8c327b4e068edb428c
Author: Leah (ctucx) <leah@ctu.cx>
Date: Sun, 10 Oct 2021 20:16:42 +0200

desktop-sway: screenlocking via systemd-lock-handler and swaylock
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/configurations/desktop-sway.nix b/configurations/desktop-sway.nix
@@ -36,6 +36,7 @@
     ./xdg.nix
 
     ./yubikey.nix
+    ./programs/systemd-lock-handler.nix
 
     ./programs/cli/password-store.nix
 

@@ -48,6 +49,7 @@
     ./programs/sway.nix
     ./programs/waybar
     ./programs/mako.nix
+    ./programs/swaylock.nix
     ./programs/alacritty.nix
 
 	./programs/firefox.nix
diff --git a/configurations/programs/sway.nix b/configurations/programs/sway.nix
@@ -2,7 +2,6 @@
 
 {
 #  environment.noXlibs = true;
-# todo: screen-locking via $mod+L and on lidswitch
 
   home-manager.users.leah = {
 

@@ -18,7 +17,6 @@
 
     wayland.windowManager.sway = let
       cfg         = config.home-manager.users.leah.wayland.windowManager.sway;
-      lockCommand = "swaylock -i $HOME/Pictures/Backgrounds/1.jpg";
       modifier    = cfg.config.modifier;
       terminal    = cfg.config.terminal;
       wofi-style  = ./wofi/style.css;

@@ -106,7 +104,7 @@
 
           "${modifier}+Return"        = "exec ${cfg.config.terminal}";
           "${modifier}+Space"         = "exec ${cfg.config.menu}";
-          "${modifier}+l"             = "exec systemctl suspend";
+          "${modifier}+l"             = "exec ${pkgs.systemd}/bin/loginctl lock-session";
 
           "Shift+Print"               = "exec ${pkgs.grim}/bin/grim ~/Pictures/Screenshots/$(date +\"%Y-%m-%d_%H:%m:%S\").png";
           "${modifier}+Shift+Print"   = "exec ${pkgs.grim}/bin/grim -g \"$(${pkgs.slurp}/bin/slurp)\" ~/Pictures/Screenshots/$(date +\"%Y-%m-%d_%H:%m:%S\").png";