summary refs log tree commit diff stats
path: root/system/file_system_layouts/impermanence.nix
blob: 69af468898b7dfc07cb6717400f1723803b7d04b (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
{...}: {
  environment.persistence = {
    "/srv" = {
      hideMounts = true;
      directories = [
        "/etc/nixos"
        "/var/log"
        "/var/lib/postgresql"
        "/var/lib/acme"
        {
          directory = "/var/lib/nix-sync";
          user = "nix-sync";
          group = "nix-sync";
          mode = "0700";
        }
        {
          directory = "/var/lib/sshd";
          user = "root";
          group = "root";
          mode = "0700";
        }
      ];
      files = [
        "/etc/machine-id"
      ];
    };
  };
}