This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
{
config,
lib,
osConfig ? null,
...
}:
let
cfg = config.services.gpg-agent;
hwSmartcards = osConfig.hardware.gpgSmartcards.enable;
scDaemon = cfg.enable && cfg.enableScDaemon;
in
config = lib.mkIf (!builtins.isNull osConfig) {
assertions = [
assertion = scDaemon -> hwSmartcards;
message = ''
gpg-agent’s scDaemon is enabled but NixOS hardware.gpgSmartcards is disabled
'';
}
];
warnings = [
(lib.mkIf (hwSmartcards && !scDaemon) ''
NixOS hardware.gpgSmartcards is enabled but gpg-agent’s scDaemon is disabled
'')
};