nixos/desktop: add pam config for gtklock

This commit is contained in:
Aly Raffauf 2024-08-11 23:53:14 -04:00
parent 7bb74d3da9
commit c8e723b1ec

View file

@ -5,9 +5,7 @@
... ...
}: { }: {
config = lib.mkIf (config.ar.desktop.hyprland.enable || config.ar.desktop.sway.enable) { config = lib.mkIf (config.ar.desktop.hyprland.enable || config.ar.desktop.sway.enable) {
programs = { programs.gnupg.agent.pinentryPackage = lib.mkForce pkgs.pinentry-gnome3;
gnupg.agent.pinentryPackage = lib.mkForce pkgs.pinentry-gnome3;
};
services = { services = {
dbus.packages = [pkgs.gcr]; dbus.packages = [pkgs.gcr];
@ -15,29 +13,30 @@
udev.packages = [pkgs.swayosd]; udev.packages = [pkgs.swayosd];
}; };
security.pam.services = { security.pam.services = let
swaylock = { pamConfig = ''
text = '' # Account management.
# Account management. account required pam_unix.so # unix (order 10900)
account required pam_unix.so # unix (order 10900)
# Authentication management. # Authentication management.
auth sufficient pam_unix.so likeauth try_first_pass likeauth nullok # unix (order 11500) auth sufficient pam_unix.so likeauth try_first_pass likeauth nullok # unix (order 11500)
${ ${
lib.strings.optionalString config.services.fprintd.enable lib.strings.optionalString config.services.fprintd.enable
"auth sufficient ${pkgs.fprintd}/lib/security/pam_fprintd.so # fprintd (order 11300)" "auth sufficient ${pkgs.fprintd}/lib/security/pam_fprintd.so # fprintd (order 11300)"
} }
auth required pam_deny.so # deny (order 12300) auth required pam_deny.so # deny (order 12300)
# Password management. # Password management.
password sufficient pam_unix.so nullok yescrypt # unix (order 10200) password sufficient pam_unix.so nullok yescrypt # unix (order 10200)
# Session management. # Session management.
session required pam_env.so conffile=/etc/pam/environment readenv=0 # env (order 10100) session required pam_env.so conffile=/etc/pam/environment readenv=0 # env (order 10100)
session required pam_unix.so # unix (order 10200) session required pam_unix.so # unix (order 10200)
''; '';
}; in {
gtklock = {text = pamConfig;};
swaylock = {text = pamConfig;};
}; };
}; };
} }