nixos-mod/frontend: enable hardware.gnupgSmartcard & assert combination with scdaemon on home config

main
Felix Stupp 1 year ago
parent a50038e569
commit e66295f31a
Signed by: zocker
GPG Key ID: 93E1BD26F6B02FB7

@ -3,6 +3,7 @@
{ config
, lib
, options
, pkgs
, ...
}:

@ -62,6 +62,8 @@ in
powerOnBoot = true;
};
gpgSmartcards.enable = true; # scdaemon
graphics.required = true;
opengl = {

@ -18,6 +18,24 @@ in
{
# TODO exclude in own home-manager module
assertions =
let
hwSmartcards = nixosConfig.hardware.gpgSmartcards.enable;
scDaemon = with config.services.gpg-agent; enable && enableScDaemon;
in
[
{
assertion = hwSmartcards -> scDaemon;
message = "hardware.gpgSmartcards is enabled on system side but gpg-agents scDaemon is disabled";
}
{
assertion = scDaemon -> hwSmartcards;
message = "gpg-agents scDaemon is enabled but hardware.gpgSmartcards is disabled on system side";
}
];
home = {
stateVersion = nixosConfig.system.stateVersion;

Loading…
Cancel
Save