summaryrefslogtreecommitdiff
path: root/modules/shared/users/seth.nix
diff options
context:
space:
mode:
authorSeth Flynn <[email protected]>2025-02-13 20:10:29 -0500
committerSeth Flynn <[email protected]>2025-02-13 22:09:11 -0500
commit6fa0b2f154620cf8da209320865ac4a20e83b9ae (patch)
tree698c2fc6c7628ccf7d874653588bac88f31f6465 /modules/shared/users/seth.nix
parent6e70c2e409b632c113364ce34c79aa1385d8e56f (diff)
nixos+darwin: make separate user modules
Diffstat (limited to 'modules/shared/users/seth.nix')
-rw-r--r--modules/shared/users/seth.nix48
1 files changed, 48 insertions, 0 deletions
diff --git a/modules/shared/users/seth.nix b/modules/shared/users/seth.nix
new file mode 100644
index 0000000..89203c1
--- /dev/null
+++ b/modules/shared/users/seth.nix
@@ -0,0 +1,48 @@
+{
+ config,
+ lib,
+ pkgs,
+ inputs,
+ ...
+}:
+
+let
+ cfg = config.borealis.users.seth;
+
+ inherit (pkgs.stdenv.hostPlatform) isDarwin isLinux;
+in
+
+{
+ options.borealis.users.seth = {
+ enable = lib.mkEnableOption "Seth's user & home configurations";
+ };
+
+ config = lib.mkMerge [
+ (lib.mkIf cfg.enable {
+ users.users.seth.shell = pkgs.fish;
+
+ programs.fish.enable = true;
+
+ home-manager.users.seth = {
+ imports = [ (inputs.self + "/users/seth") ];
+ seth = {
+ enable = true;
+ programs.fish.enable = true;
+ };
+ };
+ })
+
+ (lib.mkIf (cfg.enable && isDarwin) {
+ users.users.seth = {
+ home = lib.mkDefault "/Users/seth";
+ };
+ })
+
+ (lib.mkIf (cfg.enable && isLinux) {
+ users.users.seth = {
+ extraGroups = [ "wheel" ];
+ isNormalUser = true;
+ };
+ })
+ ];
+}