summaryrefslogtreecommitdiff
path: root/os/srv/sops.nix
diff options
context:
space:
mode:
Diffstat (limited to 'os/srv/sops.nix')
-rw-r--r--os/srv/sops.nix9
1 files changed, 6 insertions, 3 deletions
diff --git a/os/srv/sops.nix b/os/srv/sops.nix
index 67cf8f7..e5233d6 100644
--- a/os/srv/sops.nix
+++ b/os/srv/sops.nix
@@ -2,6 +2,7 @@
config,
lib,
pkgs,
+ inputs,
username,
...
}:
@@ -9,10 +10,12 @@ let
cfg = config.os.srv.sops;
in
{
+ imports = [ inputs.sops-nix.nixosModules.sops ];
+
options.os.srv.sops.enable = lib.mkEnableOption "enables sops-nix secret storing";
config = lib.mkIf cfg.enable {
sops = {
- defaultSopsFile = ../../secrets.yaml;
+ defaultSopsFile = ../../secrets/secrets.yaml;
defaultSopsFormat = "yaml";
age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
@@ -21,12 +24,12 @@ in
"obs/websocket_password".owner = username;
root_password.neededForUsers = true;
user_password.neededForUsers = true;
- storage_key = { };
+ crypt_key = { };
};
};
boot.initrd.secrets = {
- "/tmp/storage.key" = config.sops.secrets.storage_key.path;
+ "/tmp/crypt.key" = config.sops.secrets.crypt_key.path;
};
environment.systemPackages = with pkgs; [