diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2021-05-29 15:18:04 +0200 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2021-05-29 15:18:04 +0200 |
commit | 333d4bcf563d8bc341460a5ff5e47c7fa36ddc4a (patch) | |
tree | 82f9c823b587c0c423192eeed026f172f52eb431 /hosts/surtr/default.nix | |
parent | 28e1cd3729bd39e34c5c0aabda3b5d53d4877133 (diff) | |
download | nixos-333d4bcf563d8bc341460a5ff5e47c7fa36ddc4a.tar nixos-333d4bcf563d8bc341460a5ff5e47c7fa36ddc4a.tar.gz nixos-333d4bcf563d8bc341460a5ff5e47c7fa36ddc4a.tar.bz2 nixos-333d4bcf563d8bc341460a5ff5e47c7fa36ddc4a.tar.xz nixos-333d4bcf563d8bc341460a5ff5e47c7fa36ddc4a.zip |
surtr: zfs snapshots
Diffstat (limited to 'hosts/surtr/default.nix')
-rw-r--r-- | hosts/surtr/default.nix | 34 |
1 files changed, 5 insertions, 29 deletions
diff --git a/hosts/surtr/default.nix b/hosts/surtr/default.nix index ba304e22..8cbb51ef 100644 --- a/hosts/surtr/default.nix +++ b/hosts/surtr/default.nix | |||
@@ -1,7 +1,7 @@ | |||
1 | { flake, pkgs, ... }: | 1 | { flake, pkgs, ... }: |
2 | { | 2 | { |
3 | imports = with flake.nixosModules.systemProfiles; [ | 3 | imports = with flake.nixosModules.systemProfiles; [ |
4 | qemu-guest openssh rebuild-machines | 4 | qemu-guest openssh rebuild-machines ./zfs.nix |
5 | ]; | 5 | ]; |
6 | 6 | ||
7 | config = { | 7 | config = { |
@@ -24,7 +24,10 @@ | |||
24 | tmpOnTmpfs = true; | 24 | tmpOnTmpfs = true; |
25 | 25 | ||
26 | supportedFilesystems = [ "zfs" ]; | 26 | supportedFilesystems = [ "zfs" ]; |
27 | zfs.devNodes = "/dev"; # /dev/vda2 does not show up in /dev/disk/by-id | 27 | zfs = { |
28 | enableUnstable = true; | ||
29 | devNodes = "/dev"; # /dev/vda2 does not show up in /dev/disk/by-id | ||
30 | }; | ||
28 | }; | 31 | }; |
29 | 32 | ||
30 | fileSystems = { | 33 | fileSystems = { |
@@ -37,33 +40,6 @@ | |||
37 | { device = "/dev/disk/by-label/boot"; | 40 | { device = "/dev/disk/by-label/boot"; |
38 | fsType = "vfat"; | 41 | fsType = "vfat"; |
39 | }; | 42 | }; |
40 | |||
41 | "/nix" = | ||
42 | { device = "surtr/local/nix"; | ||
43 | fsType = "zfs"; | ||
44 | }; | ||
45 | |||
46 | "/root" = | ||
47 | { device = "surtr/safe/home-root"; | ||
48 | fsType = "zfs"; | ||
49 | neededForBoot = true; | ||
50 | }; | ||
51 | |||
52 | "/var/lib/systemd" = | ||
53 | { device = "surtr/local/var-lib-systemd"; | ||
54 | fsType = "zfs"; | ||
55 | neededForBoot = true; | ||
56 | }; | ||
57 | |||
58 | "/var/log" = | ||
59 | { device = "surtr/local/var-log"; | ||
60 | fsType = "zfs"; | ||
61 | }; | ||
62 | |||
63 | "/home" = | ||
64 | { device = "surtr/safe/home"; | ||
65 | fsType = "zfs"; | ||
66 | }; | ||
67 | }; | 43 | }; |
68 | 44 | ||
69 | networking = { | 45 | networking = { |