TODO: test ephemeral root works as expected
This commit is contained in:
@@ -89,6 +89,11 @@ in
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Rollback root on reboot
|
||||||
|
boot.initrd.postDeviceCommands = lib.mkAfter ''
|
||||||
|
zfs rollback -r zpool/local/root@blank
|
||||||
|
'';
|
||||||
|
|
||||||
networking.hostName = meta.hostname;
|
networking.hostName = meta.hostname;
|
||||||
networking.hostId = meta.hostId;
|
networking.hostId = meta.hostId;
|
||||||
|
|
||||||
|
|||||||
+11
-11
@@ -39,28 +39,28 @@
|
|||||||
"com.sun:auto-snapshot" = "false";
|
"com.sun:auto-snapshot" = "false";
|
||||||
};
|
};
|
||||||
# what should I be making a snapshot of here?!!!!
|
# what should I be making a snapshot of here?!!!!
|
||||||
postCreateHook = "zfs list -t snapshot -H -o name | grep -E '^zpool/local/zroot@blank$' || zfs snapshot zpool/local/zroot@blank";
|
|
||||||
|
|
||||||
datasets = {
|
datasets = {
|
||||||
"root" = {
|
"local/root" = {
|
||||||
type = "zfs_fs";
|
type = "zfs_fs";
|
||||||
options.mountpoint = "/";
|
options.mountpoint = "/";
|
||||||
mountpoint = "/";
|
mountpoint = "/";
|
||||||
|
postCreateHook = "zfs list -t snapshot -H -o name | grep -E '^zroot/local/root@blank$' || zfs snapshot zroot/local/root@blank";
|
||||||
};
|
};
|
||||||
"nix" = {
|
"local/nix" = {
|
||||||
type = "zfs_fs";
|
type = "zfs_fs";
|
||||||
options.mountpoint = "/local/nix";
|
options.mountpoint = "/nix";
|
||||||
mountpoint = "/local/nix";
|
mountpoint = "/nix";
|
||||||
};
|
};
|
||||||
"home" = {
|
"safe/home" = {
|
||||||
type = "zfs_fs";
|
type = "zfs_fs";
|
||||||
options.mountpoint = "/safe/home";
|
options.mountpoint = "/home";
|
||||||
mountpoint = "/safe/home";
|
mountpoint = "/home";
|
||||||
};
|
};
|
||||||
"persist" = {
|
"safe/persist" = {
|
||||||
type = "zfs_fs";
|
type = "zfs_fs";
|
||||||
options.mountpoint = "/safe/persist";
|
options.mountpoint = "/persist";
|
||||||
mountpoint = "/safe/persist";
|
mountpoint = "/persist";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user