nixos/secrets: Change runtime directory

This commit is contained in:
Jack O'Sullivan 2022-06-12 11:45:21 +01:00
parent fe9825fa05
commit 86fffdcc8d
2 changed files with 5 additions and 4 deletions

6
flake.lock generated
View File

@ -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": {

View File

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