aboutsummaryrefslogtreecommitdiffstats
path: root/hosts/arrakis/services.nix
blob: 2d36be07eee819c23e2e4ed864c894e19219c202 (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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
{
  services.clamav.updater.enable = true;

  services.smartd = let my_email_addr = "nipsy@bitgnome.net"; in {
    enable = true;
    devices = [
      {
        device = "/dev/disk/by-id/nvme-WD_BLACK_SN850X_4000GB_23162P800005";
        options = "-a -o on -S on -m ${my_email_addr}";
      }
      {
        device = "/dev/disk/by-id/nvme-WD_BLACK_SN850X_4000GB_23162P800014";
        options = "-a -o on -S on -m ${my_email_addr}";
      }
      {
        device = "/dev/disk/by-id/ata-WDC_WD80EFAX-68KNBN0_VAHUEZNL";
        options = "-a -o on -S on -s (S/../.././02|L/../../5/03) -m ${my_email_addr}";
      }
      {
        device = "/dev/disk/by-id/ata-WDC_WD80EFAX-68KNBN0_VAHUUSXL";
        options = "-a -o on -S on -s (S/../.././02|L/../../5/03) -m ${my_email_addr}";
      }
      {
        device = "/dev/disk/by-id/ata-WDC_WD80EFAX-68KNBN0_VAHV0H5L";
        options = "-a -o on -S on -s (S/../.././02|L/../../5/03) -m ${my_email_addr}";
      }
      {
        device = "/dev/disk/by-id/ata-WDC_WD80EFAX-68KNBN0_VAHUK5EL";
        options = "-a -o on -S on -s (S/../.././02|L/../../5/03) -m ${my_email_addr}";
      }
      {
        device = "/dev/disk/by-id/ata-WDC_WD80EFAX-68KNBN0_VAHV5JEL";
        options = "-a -o on -S on -s (S/../.././02|L/../../5/03) -m ${my_email_addr}";
      }
      {
        device = "/dev/disk/by-id/ata-WDC_WD80EFAX-68KNBN0_VAHUZ42L";
        options = "-a -o on -S on -s (S/../.././02|L/../../5/03) -m ${my_email_addr}";
      }
      {
        device = "/dev/disk/by-id/ata-WDC_WD80EFAX-68KNBN0_VAHV3BSL";
        options = "-a -o on -S on -s (S/../.././02|L/../../5/03) -m ${my_email_addr}";
      }
      {
        device = "/dev/disk/by-id/ata-WDC_WD80EFAX-68KNBN0_VAHV338L";
        options = "-a -o on -S on -s (S/../.././02|L/../../5/03) -m ${my_email_addr}";
      }
    ];
  };

  services.samba = {
    enable = true;
    settings = 
      {
        global = {
          "invalid users" = [
            "root"
          ];
          "passwd program" = "/run/wrappers/bin/passwd %u";
          security = "user";
          "smb1 unix extensions" = "no";
        };
        homes = {
          browseable = "no";
          "create mask" = "0775";
          "directory mask" = "0775";
          "read only" = "no";
          "valid users" = "%S";
          "wide links" = "yes";
        };
        nipsy-ro = {
          browseable = "no";
          path = "/home/nipsy";
          "read only" = "yes";
          "valid users" = "nipsy";
          "wide links" = "yes";
        };
      };
  };
}