diff options
author | Soispha <soispha@vhack.eu> | 2023-07-29 21:58:49 +0200 |
---|---|---|
committer | Soispha <soispha@vhack.eu> | 2023-07-30 00:19:30 +0200 |
commit | 3f5e7b952916a9198afa6bcb85f9ad15187b0a80 (patch) | |
tree | 8029c515b900eb8453a629cc9424778f0cd03859 /secrets/default.nix | |
parent | Style(treewide): Remove some unused imports (diff) | |
download | nixos-config-3f5e7b952916a9198afa6bcb85f9ad15187b0a80.tar.gz nixos-config-3f5e7b952916a9198afa6bcb85f9ad15187b0a80.zip |
Feat(treewide): Add enable options for secrets and impermanence
Diffstat (limited to '')
-rw-r--r-- | secrets/default.nix | 46 |
1 files changed, 26 insertions, 20 deletions
diff --git a/secrets/default.nix b/secrets/default.nix index 1807fb8d..d1fc1714 100644 --- a/secrets/default.nix +++ b/secrets/default.nix @@ -1,25 +1,31 @@ -{config, ...}: let +{ + config, + lib, + ... +}: let name = config.networking.hostName; in { - age = { - secrets = { - nheko = { - file = ./nheko/conf. + name; - mode = "700"; - owner = "soispha"; - group = "users"; - }; - serverphoneCa = { - file = ./serverphone/ca.key; - mode = "700"; - owner = "serverphone"; - group = "serverphone"; - }; - serverphoneServer = { - file = ./serverphone/server.key; - mode = "700"; - owner = "serverphone"; - group = "serverphone"; + config = lib.mkIf config.soispha.secrets.enable { + age = { + secrets = { + nheko = { + file = ./nheko/conf. + name; + mode = "700"; + owner = "soispha"; + group = "users"; + }; + serverphoneCa = { + file = ./serverphone/ca.key; + mode = "700"; + owner = "serverphone"; + group = "serverphone"; + }; + serverphoneServer = { + file = ./serverphone/server.key; + mode = "700"; + owner = "serverphone"; + group = "serverphone"; + }; }; }; }; |