fix: bad age.identityPaths default value on darwin

This commit is contained in:
codgician 2025-01-12 22:19:38 +08:00
parent f6291c5935
commit cce0ff472c
No known key found for this signature in database

View file

@ -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 [