2024-07-26 23:07:07 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
config,
|
|
|
|
...
|
|
|
|
}: let
|
2024-06-24 23:32:59 +00:00
|
|
|
inherit (lib) mkIf;
|
|
|
|
deviceType = config.myOptions.device.roles.type;
|
|
|
|
acceptedTypes = ["laptop" "desktop"];
|
|
|
|
in {
|
|
|
|
config = mkIf (builtins.elem deviceType acceptedTypes) {
|
|
|
|
# unlock GPG keyring on login
|
|
|
|
security.pam.services = let
|
|
|
|
gnupg = {
|
|
|
|
enable = true;
|
|
|
|
noAutostart = true;
|
|
|
|
storeOnly = true;
|
|
|
|
};
|
|
|
|
in {
|
|
|
|
login = {
|
|
|
|
enableGnomeKeyring = true;
|
|
|
|
inherit gnupg;
|
|
|
|
};
|
|
|
|
|
|
|
|
greetd = {
|
|
|
|
enableGnomeKeyring = true;
|
|
|
|
inherit gnupg;
|
|
|
|
};
|
|
|
|
|
|
|
|
tuigreet = {
|
|
|
|
enableGnomeKeyring = true;
|
|
|
|
inherit gnupg;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|