summaryrefslogtreecommitdiff
path: root/modules/shared/users/seth.nix
blob: 0c98fc9c09b3953085048ea00275b95c0ae9b6a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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];
    };
  };
}