diff --git a/flake.lock b/flake.lock index b7b27e4..7a4ae6c 100644 --- a/flake.lock +++ b/flake.lock @@ -7,11 +7,11 @@ ] }, "locked": { - "lastModified": 1643841757, - "narHash": "sha256-9tKhu4JzoZvustC9IEWK6wKcDhPLuK/ICbLgm8QnLnk=", + "lastModified": 1652712410, + "narHash": "sha256-hMJ2TqLt0DleEnQFGUHK9sV2aAzJPU8pZeiZoqRozbE=", "owner": "ryantm", "repo": "agenix", - "rev": "a17d1f30550260f8b45764ddbd0391f4b1ed714a", + "rev": "7e5e58b98c3dcbf497543ff6f22591552ebfe65b", "type": "github" }, "original": { diff --git a/nixos/modules/secrets.nix b/nixos/modules/secrets.nix index 17c02f0..b0658a3 100644 --- a/nixos/modules/secrets.nix +++ b/nixos/modules/secrets.nix @@ -1,7 +1,7 @@ { lib, pkgs, config, secretsPath, ... }: let inherit (builtins) mapAttrs; - inherit (lib) mkMerge mkIf; + inherit (lib) mkMerge mkIf mkDefault; inherit (lib.my) mkOpt'; cfg = config.my.secrets; @@ -16,6 +16,7 @@ in config = mkMerge [ { age = { + secretsDir = mkDefault "/run/secrets"; secrets = mapAttrs (f: opts: { file = "${secretsPath}/${f}.age"; } // opts) cfg.files;