diff --git a/common/default.nix b/common/default.nix index b69520c..fe710ec 100644 --- a/common/default.nix +++ b/common/default.nix @@ -1,3 +1,7 @@ -{ ... }: { - imports = [ ./nix.nix ./secrets.nix ./users.nix ]; +_: { + imports = [ ./nix.nix ./users.nix ]; + + sops = { + defaultSopsFile = ../secrets.yaml; + }; } diff --git a/common/secrets.nix b/common/secrets.nix deleted file mode 100644 index a316be5..0000000 --- a/common/secrets.nix +++ /dev/null @@ -1,19 +0,0 @@ -{ config, ... }: { - sops = { - defaultSopsFile = ../secrets.yaml; - secrets = { - "passwd/root" = { - mode = "400"; - owner = config.users.users.root.name; - group = config.users.users.root.group; - neededForUsers = true; - }; - "passwd/adtya" = { - mode = "400"; - owner = config.users.users.root.name; - group = config.users.users.root.group; - neededForUsers = true; - }; - }; - }; -} diff --git a/common/users.nix b/common/users.nix index 335e4bf..67cabe5 100644 --- a/common/users.nix +++ b/common/users.nix @@ -1,4 +1,20 @@ { config, pkgs, username, ... }: { + sops = { + secrets = { + "passwd/root" = { + mode = "400"; + owner = config.users.users.root.name; + group = config.users.users.root.group; + neededForUsers = true; + }; + "passwd/adtya" = { + mode = "400"; + owner = config.users.users.root.name; + group = config.users.users.root.group; + neededForUsers = true; + }; + }; + }; users.mutableUsers = false; users.users = { root = {