From 0f965c29d8405567c2f5e08e53d1bc84530624f9 Mon Sep 17 00:00:00 2001 From: codgician <15964984+codgician@users.noreply.github.com> Date: Sun, 12 Jan 2025 22:12:47 +0800 Subject: [PATCH] age: fix default value of identityPaths on darwin --- modules/age.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 [