mirror of
https://github.com/ItsDrike/nixdots
synced 2024-11-10 07:29:43 +00:00
36 lines
655 B
Nix
36 lines
655 B
Nix
{
|
|
lib,
|
|
config,
|
|
...
|
|
}: let
|
|
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;
|
|
};
|
|
};
|
|
};
|
|
}
|