summaryrefslogtreecommitdiffstats
path: root/old/modules/nomic/users.nix
blob: 70e1d8dcd50747251652eb613f0cd5d7647ed9dd (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
36
37
38
39
40
41
42
{ pkgs, ... }:

{
  imports = [
    { users = import <secrets/users.nix>; }
    {
      users.extraUsers = {
        root = {
          openssh.authorizedKeys.keys = [
            (pkgs.lib.readFile <pubkeys/tv_wu.ssh.pub>)
          ];
        };
        tv = {
          uid = 1337;
          group = "users";
          home = "/home/tv";
          createHome = true;
          useDefaultShell = true;
          extraGroups = [
            "audio"
            "video"
            "wheel"
          ];
          openssh.authorizedKeys.keys = [
            (pkgs.lib.readFile <pubkeys/tv_wu.ssh.pub>)
          ];
        };
      };
    }
  ];

  users.defaultUserShell = "/run/current-system/sw/bin/bash";
  users.mutableUsers = false;

  security.setuidPrograms = [
    "sendmail"  # for sudo
  ];

  security.sudo.extraConfig = ''
    Defaults mailto="tv@wu.retiolum"
  '';
}