about summary refs log tree commit diff stats
path: root/system/impermanence/default.nix
blob: dd0fa42e76aabfeef3a3dbe1d271eaeae28698ae (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
46
47
48
49
50
51
52
{
  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;
      };
    };
    "/srv/nixos-config" = {
      directories = [
        "/etc/nixos"
      ];
    };
  };
}