summaryrefslogtreecommitdiff
path: root/modules/nixos/traits/users.nix
diff options
context:
space:
mode:
authorseth <[email protected]>2024-02-28 06:51:04 -0500
committerseth <[email protected]>2024-02-28 06:51:04 -0500
commited23d606f190aa20e620063ab65e78caf613b67c (patch)
tree00a30702876104ae07a9544ae38ff55ed92f0126 /modules/nixos/traits/users.nix
parent62621080f9f97f5dffa889daf1dbc7257ba2cda7 (diff)
modules: reorganize standalone and system user handling
Diffstat (limited to 'modules/nixos/traits/users.nix')
-rw-r--r--modules/nixos/traits/users.nix44
1 files changed, 0 insertions, 44 deletions
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;
- };
- })
- ];
-}