aboutsummaryrefslogtreecommitdiffstats
path: root/hosts/common/users/trent/default.nix
blob: 47c6ead87e05b9e754dac75d2d310b7c1dc461e2 (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
{ pkgs, inputs, config, ... }:
let
  ifTheyExist = groups: builtins.filter (group: builtins.hasAttr group config.users.groups) groups;
  uid = 1001;
in
{
  users.groups.trent.gid = uid;
  users.users.trent = {
    description = "Trent Guthrie";
    extraGroups = [
      "audio"
      "video"
      "wheel"
    ] ++ ifTheyExist [
      "adbusers"
      "dialout"
      "gamemode"
      "networkmanager"
      "vboxsf"
      "vboxusers"
    ];
    group = "trent";
    home = "/home/trent";
    isNormalUser = true;
    openssh.authorizedKeys.keys = [
      (builtins.readFile ./keys/id.pub)
      #(builtins.readFile ./keys/id_other.pub)
    ];

    packages = [ pkgs.home-manager ];
    shell = pkgs.bash;
    uid = uid;
  };
}