diff --git a/modules/age.nix b/modules/age.nix index e49d9d8..7fecfe1 100644 --- a/modules/age.nix +++ b/modules/age.nix @@ -228,7 +228,7 @@ in { identityPaths = mkOption { type = types.listOf types.path; default = - if (config.services.openssh.enable or false) + if ((config.services.openssh.enable or false) == true && config.services.openssh ? hostKeys) then map (e: e.path) (lib.filter (e: e.type == "rsa" || e.type == "ed25519") config.services.openssh.hostKeys) else if isDarwin then [ @@ -237,7 +237,7 @@ in { ] else []; defaultText = literalExpression '' - if (config.services.openssh.enable or false) + if ((config.services.openssh.enable or false) == true && config.services.openssh?hostKeys) then map (e: e.path) (lib.filter (e: e.type == "rsa" || e.type == "ed25519") config.services.openssh.hostKeys) else if isDarwin then [