diff options
| author | seth <[email protected]> | 2024-02-07 18:03:24 -0500 |
|---|---|---|
| committer | seth <[email protected]> | 2024-02-07 18:27:45 -0500 |
| commit | cffffeb678e9a1078eeba0f19c9607cda9f31bed (patch) | |
| tree | 8b8f68aa357becad06845f15b7e528474041371c /users/seth/system.nix | |
| parent | 48712d44fde91d2685089cca7f9d88295fd59817 (diff) | |
modules/nixos+darwin: move to traits + archetypes model
Diffstat (limited to 'users/seth/system.nix')
| -rw-r--r-- | users/seth/system.nix | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/users/seth/system.nix b/users/seth/system.nix new file mode 100644 index 0000000..4feb807 --- /dev/null +++ b/users/seth/system.nix @@ -0,0 +1,34 @@ +{ + config, + lib, + pkgs, + ... +}: let + cfg = config.traits.users.seth; +in { + options.traits.users.seth = { + enable = lib.mkEnableOption "Seth's user & home configuration"; + }; + + 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; + }; + + programs.fish.enable = lib.mkDefault true; + + home-manager.users.seth = { + imports = [./.]; + }; + }; +} |
