cleanup
This commit is contained in:
@@ -9,9 +9,10 @@ let
|
||||
cfg = config.${namespace}.sops;
|
||||
defaultSops = lib.snowfall.fs.get-file "secrets/secrets.yaml";
|
||||
isx86 = system == "x86_64-linux";
|
||||
user = config.${namespace}.user.name;
|
||||
in
|
||||
{
|
||||
imports = [ ./options.nix ];
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
sops = {
|
||||
defaultSopsFile = if cfg.defaultSopsFile != null then cfg.defaultSopsFile else defaultSops;
|
||||
@@ -19,16 +20,13 @@ in
|
||||
|
||||
secrets = {
|
||||
"wifi" = { };
|
||||
"disk-key".mode = "0600";
|
||||
|
||||
"matt_password" = {
|
||||
neededForUsers = true;
|
||||
mode = "0600";
|
||||
owner = config.users.users."${user}".name;
|
||||
group = config.users.users."${user}".group;
|
||||
};
|
||||
|
||||
"disk-key".mode = "0600";
|
||||
|
||||
"secureboot/GUID" = lib.mkIf isx86 { mode = "0600"; };
|
||||
"secureboot/keys/db-key" = lib.mkIf isx86 { mode = "0600"; };
|
||||
"secureboot/keys/db-pem" = lib.mkIf isx86 { mode = "0600"; };
|
||||
@@ -37,8 +35,6 @@ in
|
||||
"secureboot/keys/PK-key" = lib.mkIf isx86 { mode = "0600"; };
|
||||
"secureboot/keys/PK-pem" = lib.mkIf isx86 { mode = "0600"; };
|
||||
};
|
||||
|
||||
templates = { };
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ with lib;
|
||||
enable = mkEnableOption "enable sops";
|
||||
|
||||
defaultSopsFile = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
type = types.nullOr types.path;
|
||||
default = null;
|
||||
description = "Default sops file to use for secrets. If null, will use the system-wide default.";
|
||||
example = "/etc/nixos/secrets/secrets.yaml";
|
||||
|
||||
Reference in New Issue
Block a user