This commit is contained in:
mjallen18
2025-07-28 11:06:32 -05:00
parent 5ae3f1a9ef
commit 6f5e592d8c
22 changed files with 95 additions and 106 deletions

View File

@@ -1,6 +1,8 @@
{ config, lib, ... }:
let
user = "nix-apps";
defaultSops = (lib.snowfall.fs.get-file "secrets/nas-secrets.yaml");
sharedSops = (lib.snowfall.fs.get-file "secrets/secrets.yaml");
in
{
# Permission modes are in octal representation (same as chmod),
@@ -18,7 +20,7 @@ in
# Either the group id or group name representation of the secret group
# It is recommended to get the group name from `config.users.users.<?name>.group` to avoid misconfiguration
sops = {
defaultSopsFile = lib.mkForce ../../../secrets/nas-secrets.yaml;
defaultSopsFile = lib.mkForce defaultSops;
age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
# ------------------------------
@@ -33,7 +35,7 @@ in
};
"wifi" = {
sopsFile = ../../../secrets/secrets.yaml;
sopsFile = sharedSops;
};
# ------------------------------
@@ -55,12 +57,12 @@ in
# ------------------------------
"ssh-keys-public/jallen-nas-root" = {
sopsFile = ../../../secrets/secrets.yaml;
sopsFile = sharedSops;
path = "/root/.ssh/id_ed25519.pub";
mode = "0640";
};
"ssh-keys-private/jallen-nas-root" = {
sopsFile = ../../../secrets/secrets.yaml;
sopsFile = sharedSops;
path = "/root/.ssh/id_ed25519";
mode = "0600";
};
@@ -199,37 +201,37 @@ in
# ------------------------------
"secureboot/GUID" = {
sopsFile = ../../../secrets/secrets.yaml;
sopsFile = sharedSops;
path = "/etc/secureboot/GUID";
mode = "0640";
};
"secureboot/keys/db-key" = {
sopsFile = ../../../secrets/secrets.yaml;
sopsFile = sharedSops;
path = "/etc/secureboot/keys/db/db.key";
mode = "0640";
};
"secureboot/keys/db-pem" = {
sopsFile = ../../../secrets/secrets.yaml;
sopsFile = sharedSops;
path = "/etc/secureboot/keys/db/db.pem";
mode = "0640";
};
"secureboot/keys/KEK-key" = {
sopsFile = ../../../secrets/secrets.yaml;
sopsFile = sharedSops;
path = "/etc/secureboot/keys/KEK/KEK.key";
mode = "0640";
};
"secureboot/keys/KEK-pem" = {
sopsFile = ../../../secrets/secrets.yaml;
sopsFile = sharedSops;
path = "/etc/secureboot/keys/KEK/KEK.pem";
mode = "0640";
};
"secureboot/keys/PK-key" = {
sopsFile = ../../../secrets/secrets.yaml;
sopsFile = sharedSops;
path = "/etc/secureboot/keys/PK/PK.key";
mode = "0640";
};
"secureboot/keys/PK-pem" = {
sopsFile = ../../../secrets/secrets.yaml;
sopsFile = sharedSops;
path = "/etc/secureboot/keys/PK/PK.pem";
mode = "0640";
};