From 12856e3795561ed0d51d07c308fe3dbb2758fb99 Mon Sep 17 00:00:00 2001 From: Alexander Heldt Date: Wed, 9 Aug 2023 11:48:24 +0200 Subject: [PATCH] pinwheel: Add `swaylock` --- hosts/pinwheel/configuration.nix | 6 ++++++ hosts/pinwheel/home.nix | 10 ++++++++++ 2 files changed, 16 insertions(+) diff --git a/hosts/pinwheel/configuration.nix b/hosts/pinwheel/configuration.nix index 146689c..2496ded 100644 --- a/hosts/pinwheel/configuration.nix +++ b/hosts/pinwheel/configuration.nix @@ -166,6 +166,12 @@ }; }; + security.pam.services.swaylock.text = '' + # PAM configuration file for the swaylock screen locker. By default, it includes + # the 'login' configuration file (see /etc/pam.d/login) + auth include login + ''; + age = { identityPaths = [ "/etc/ssh/pinwheel" ]; diff --git a/hosts/pinwheel/home.nix b/hosts/pinwheel/home.nix index a13458d..151d00b 100644 --- a/hosts/pinwheel/home.nix +++ b/hosts/pinwheel/home.nix @@ -181,6 +181,7 @@ move = builtins.genList (x: "$mod SHIFT, ${ws x}, movetoworkspacesilent, ${builtins.toString (x + 1)}") 10; in select ++ move ++ [ + "$mod, x, exec, swaylock" "$mod SHIFT, x, exec, systemctl suspend" "$mod, RETURN, exec, foot" @@ -236,6 +237,15 @@ }; style = ''''; + + programs.swaylock = { + enable = true; + + settings = { + color = "000000"; + indicator-idle-visible = false; + show-failed-attempts = true; + }; }; services.dunst.enable = true;