From 05f8facf2e30b1a6a3eb908a3eec2ec23d3fc2c4 Mon Sep 17 00:00:00 2001 From: Aly Raffauf Date: Fri, 14 Jun 2024 13:39:01 -0400 Subject: [PATCH] nixos/users: add morgan --- nixosModules/options.nix | 7 +++++++ nixosModules/users/default.nix | 2 +- nixosModules/users/morgan/default.nix | 16 ++++++++++++++++ 3 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 nixosModules/users/morgan/default.nix diff --git a/nixosModules/options.nix b/nixosModules/options.nix index a70d6a87..1579b405 100644 --- a/nixosModules/options.nix +++ b/nixosModules/options.nix @@ -261,6 +261,13 @@ type = lib.types.str; }; }; + morgan = { + enable = lib.mkEnableOption "Morgan's user."; + password = lib.mkOption { + description = "Hashed password for morgan."; + type = lib.types.str; + }; + }; }; }; }; diff --git a/nixosModules/users/default.nix b/nixosModules/users/default.nix index 57834fe0..e6f57ef9 100644 --- a/nixosModules/users/default.nix +++ b/nixosModules/users/default.nix @@ -7,9 +7,9 @@ ... }: { imports = [ - inputs.home-manager.nixosModules.home-manager ./aly ./dustin + ./morgan ]; home-manager = { diff --git a/nixosModules/users/morgan/default.nix b/nixosModules/users/morgan/default.nix new file mode 100644 index 00000000..e63c8582 --- /dev/null +++ b/nixosModules/users/morgan/default.nix @@ -0,0 +1,16 @@ +{ + inputs, + pkgs, + lib, + config, + ... +}: { + config = lib.mkIf config.alyraffauf.users.morgan.enable { + users.users.morgan = { + description = "Morgan Tamayo"; + extraGroups = ["networkmanager" "wheel" "docker" "libvirtd" "video"]; + hashedPassword = config.alyraffauf.users.morgan.password; + isNormalUser = true; + }; + }; +}