nixos/secrets: Change runtime directory
This commit is contained in:
parent
fe9825fa05
commit
86fffdcc8d
6
flake.lock
generated
6
flake.lock
generated
@ -7,11 +7,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1643841757,
|
"lastModified": 1652712410,
|
||||||
"narHash": "sha256-9tKhu4JzoZvustC9IEWK6wKcDhPLuK/ICbLgm8QnLnk=",
|
"narHash": "sha256-hMJ2TqLt0DleEnQFGUHK9sV2aAzJPU8pZeiZoqRozbE=",
|
||||||
"owner": "ryantm",
|
"owner": "ryantm",
|
||||||
"repo": "agenix",
|
"repo": "agenix",
|
||||||
"rev": "a17d1f30550260f8b45764ddbd0391f4b1ed714a",
|
"rev": "7e5e58b98c3dcbf497543ff6f22591552ebfe65b",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{ lib, pkgs, config, secretsPath, ... }:
|
{ lib, pkgs, config, secretsPath, ... }:
|
||||||
let
|
let
|
||||||
inherit (builtins) mapAttrs;
|
inherit (builtins) mapAttrs;
|
||||||
inherit (lib) mkMerge mkIf;
|
inherit (lib) mkMerge mkIf mkDefault;
|
||||||
inherit (lib.my) mkOpt';
|
inherit (lib.my) mkOpt';
|
||||||
|
|
||||||
cfg = config.my.secrets;
|
cfg = config.my.secrets;
|
||||||
@ -16,6 +16,7 @@ in
|
|||||||
config = mkMerge [
|
config = mkMerge [
|
||||||
{
|
{
|
||||||
age = {
|
age = {
|
||||||
|
secretsDir = mkDefault "/run/secrets";
|
||||||
secrets = mapAttrs (f: opts: {
|
secrets = mapAttrs (f: opts: {
|
||||||
file = "${secretsPath}/${f}.age";
|
file = "${secretsPath}/${f}.age";
|
||||||
} // opts) cfg.files;
|
} // opts) cfg.files;
|
||||||
|
Loading…
Reference in New Issue
Block a user