2024-05-26 00:36:48 -04:00
|
|
|
{
|
|
|
|
pkgs,
|
|
|
|
lib,
|
|
|
|
config,
|
|
|
|
...
|
|
|
|
}: {
|
2024-06-26 22:13:02 -04:00
|
|
|
config = lib.mkIf (config.ar.desktop.hyprland.enable || config.ar.desktop.sway.enable) {
|
2024-08-11 23:53:14 -04:00
|
|
|
programs.gnupg.agent.pinentryPackage = lib.mkForce pkgs.pinentry-gnome3;
|
2024-05-27 21:39:30 -04:00
|
|
|
|
2024-05-26 00:36:48 -04:00
|
|
|
services = {
|
|
|
|
dbus.packages = [pkgs.gcr];
|
|
|
|
gnome.gnome-keyring.enable = lib.mkDefault true;
|
|
|
|
udev.packages = [pkgs.swayosd];
|
|
|
|
};
|
|
|
|
|
2024-08-11 23:53:14 -04:00
|
|
|
security.pam.services = let
|
|
|
|
pamConfig = ''
|
|
|
|
# Account management.
|
|
|
|
account required pam_unix.so # unix (order 10900)
|
2024-05-26 14:09:10 -04:00
|
|
|
|
2024-08-11 23:53:14 -04:00
|
|
|
# Authentication management.
|
|
|
|
auth sufficient pam_unix.so likeauth try_first_pass likeauth nullok # unix (order 11500)
|
|
|
|
${
|
|
|
|
lib.strings.optionalString config.services.fprintd.enable
|
|
|
|
"auth sufficient ${pkgs.fprintd}/lib/security/pam_fprintd.so # fprintd (order 11300)"
|
|
|
|
}
|
2024-05-26 14:58:07 -04:00
|
|
|
|
2024-08-11 23:53:14 -04:00
|
|
|
auth required pam_deny.so # deny (order 12300)
|
2024-05-26 14:09:10 -04:00
|
|
|
|
2024-08-11 23:53:14 -04:00
|
|
|
# Password management.
|
|
|
|
password sufficient pam_unix.so nullok yescrypt # unix (order 10200)
|
2024-05-26 14:09:10 -04:00
|
|
|
|
2024-08-11 23:53:14 -04:00
|
|
|
# Session management.
|
|
|
|
session required pam_env.so conffile=/etc/pam/environment readenv=0 # env (order 10100)
|
|
|
|
session required pam_unix.so # unix (order 10200)
|
|
|
|
'';
|
|
|
|
in {
|
|
|
|
gtklock = {text = pamConfig;};
|
|
|
|
swaylock = {text = pamConfig;};
|
2024-05-26 00:36:48 -04:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|