From ed23d606f190aa20e620063ab65e78caf613b67c Mon Sep 17 00:00:00 2001 From: seth Date: Wed, 28 Feb 2024 06:51:04 -0500 Subject: modules: reorganize standalone and system user handling --- modules/nixos/traits/users.nix | 44 ------------------------------------------ 1 file changed, 44 deletions(-) delete mode 100644 modules/nixos/traits/users.nix (limited to 'modules/nixos/traits/users.nix') diff --git a/modules/nixos/traits/users.nix b/modules/nixos/traits/users.nix deleted file mode 100644 index de28c00..0000000 --- a/modules/nixos/traits/users.nix +++ /dev/null @@ -1,44 +0,0 @@ -{ - config, - lib, - pkgs, - secretsDir, - ... -}: let - cfg = config.traits.users; - inherit (config.networking) hostName; -in { - options.traits.users = { - hostUser = { - enable = lib.mkEnableOption "${hostName} user configuration"; - manageSecrets = - lib.mkEnableOption "automatic secrets management" - // { - default = config.traits.secrets.enable; - }; - }; - }; - - imports = [ - ../../../users/seth/nixos.nix - ]; - - config = lib.mkMerge [ - (lib.mkIf cfg.hostUser.enable { - users.users.${hostName} = { - isNormalUser = true; - shell = pkgs.bash; - }; - }) - - (lib.mkIf (cfg.hostUser.enable && cfg.hostUser.manageSecrets) { - age.secrets = { - userPassword.file = secretsDir + "/userPassword.age"; - }; - - users.users.${hostName} = { - hashedPasswordFile = config.age.secrets.userPassword.path; - }; - }) - ]; -} -- cgit v1.2.3