From fcc60b84e5e3cc44986d40af63f5de488caae909 Mon Sep 17 00:00:00 2001 From: seth Date: Sat, 3 Feb 2024 19:27:26 -0500 Subject: make everything a module --- modules/shared/users/seth.nix | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 modules/shared/users/seth.nix (limited to 'modules/shared/users/seth.nix') diff --git a/modules/shared/users/seth.nix b/modules/shared/users/seth.nix new file mode 100644 index 0000000..0c98fc9 --- /dev/null +++ b/modules/shared/users/seth.nix @@ -0,0 +1,35 @@ +{ + config, + lib, + pkgs, + ... +}: let + cfg = config.users.seth; +in { + options.users.seth = { + enable = lib.mkEnableOption "Seth's configuration & home"; + }; + + config = lib.mkIf cfg.enable { + users.users.seth = + { + shell = pkgs.fish; + home = lib.mkDefault ( + if pkgs.stdenv.isDarwin + then "/Users/seth" + else "/home/seth" + ); + } + // lib.optionalAttrs pkgs.stdenv.isLinux { + extraGroups = ["wheel"]; + isNormalUser = true; + hashedPasswordFile = lib.mkDefault config.age.secrets.sethPassword.path; + }; + + programs.fish.enable = lib.mkDefault true; + + home-manager.users.seth = { + imports = [../../../users/seth]; + }; + }; +} -- cgit v1.2.3