about summary refs log tree commit diff stats
path: root/system/impermanence/default.nix
blob: 16ac3c471d5390ae2507666f5452cfd0806a82de (plain) (blame)
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
{
  config,
  impermanence,
  ...
}: {
  imports = [
    impermanence.nixosModules.impermanence
  ];

  environment.persistence."/srv" = {
    hideMounts = true;
    directories = [
      "/var/log"
      # TODO this needs to be checked
      #"/var/lib/bluetooth"
      #"/var/lib/nixos"
      #"/var/lib/systemd/coredump"
      {
        directory = "/var/lib/colord";
        user = "colord";
        group = "colord";
        mode = "u=rwx,g=rx,o=";
      }
    ];
    files = [
      "/etc/machine-id"
      {
        file = "/etc/nix/id_rsa";
        parentDirectory = {mode = "u=rwx,g=,o=";};
      }
    ];
    users.soispha = {
      home = "/srv/home/soispha"; # TODO link this to ${config.users.users.soispha.homeDirectory}
      directories = [
        ".local/share"
        ".cache"

        "media"
        "repos"
        "school"
      ];
      # TODO allowOther = true;
    };
  };
}