Skip to content

Commit

Permalink
age: fix default value of identityPaths on darwin
Browse files Browse the repository at this point in the history
  • Loading branch information
codgician committed Jan 12, 2025
1 parent f6291c5 commit 0f965c2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/age.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 [
Expand All @@ -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 [
Expand Down

0 comments on commit 0f965c2

Please sign in to comment.