summaryrefslogtreecommitdiff
path: root/modules/nixos/common/users.nix
blob: 367af416e3a3229627b0baf0f514a1b70f5d7f44 (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
{lib, ...}:
with lib; let
  home = "/home/${my.username}";
in {
  ark.directories = [home];

  users = {
    mutableUsers = false;

    users = {
      root.hashedPassword = "@HASHED_PASSWORD@";

      ${my.username} = {
        isNormalUser = true;
        uid = 1000;
        description = my.fullname;
        inherit home;
        inherit (my) hashedPassword;
        openssh.authorizedKeys.keys = [my.ssh.key];
        extraGroups = ["wheel"];
      };
    };
  };
}