Persist more stuff on omen

Signed-off-by: magic_rb <richard@brezak.sk>
This commit is contained in:
magic_rb 2023-10-22 00:34:04 +02:00
parent 880ffeec87
commit e59817b20f
No known key found for this signature in database
GPG key ID: 08D5287CC5DDCA0E
2 changed files with 15 additions and 0 deletions

View file

@ -51,6 +51,16 @@ in
fsType = "zfs";
neededForBoot = true;
};
"/root" = {
device = "omen-ssd/ephemeral/root";
fsType = "zfs";
neededForBoot = true;
};
"/nix/tmp" = {
device = "omen-ssd/ephemeral/nix-tmp";
fsType = "zfs";
neededForBoot = true;
};
"/boot/1" = {
device = "/dev/disk/by-uuid/14647e24-3421-4398-b30e-537de6472433";

View file

@ -17,6 +17,7 @@
"/var/lib/systemd/coredump"
"/var/lib/iwd"
"/var/lib/syncthing"
"/var/lib/containers"
];
files = [
"/etc/machine-id"
@ -82,6 +83,8 @@
serviceConfig.Type = "oneshot";
script = ''
${pkgs.rolling_datasets}/bin/roll_dataset "omen-ssd/ephemeral/home" "10"
${pkgs.rolling_datasets}/bin/roll_dataset "omen-ssd/ephemeral/root" "10"
${pkgs.rolling_datasets}/bin/roll_dataset "omen-ssd/ephemeral/nix-tmp" "10"
'';
};
@ -93,6 +96,8 @@
script = ''
${pkgs.rolling_datasets}/bin/mount_datasets "omen-ssd/ephemeral/home" "/home/.old"
${pkgs.rolling_datasets}/bin/mount_datasets "omen-ssd/ephemeral/root" "/root/.old"
${pkgs.rolling_datasets}/bin/mount_datasets "omen-ssd/ephemeral/nix-tmp" "/nix/tmp/.old"
'';
serviceConfig = {