From e59817b20feb9a1f23256ce9111801be7ae16c79 Mon Sep 17 00:00:00 2001 From: magic_rb Date: Sun, 22 Oct 2023 00:34:04 +0200 Subject: [PATCH] Persist more stuff on omen Signed-off-by: magic_rb --- nixos/systems/omen/filesystems.nix | 10 ++++++++++ nixos/systems/omen/impermenance.nix | 5 +++++ 2 files changed, 15 insertions(+) diff --git a/nixos/systems/omen/filesystems.nix b/nixos/systems/omen/filesystems.nix index 3bdb29f..0993e73 100644 --- a/nixos/systems/omen/filesystems.nix +++ b/nixos/systems/omen/filesystems.nix @@ -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"; diff --git a/nixos/systems/omen/impermenance.nix b/nixos/systems/omen/impermenance.nix index 5862695..0d08566 100644 --- a/nixos/systems/omen/impermenance.nix +++ b/nixos/systems/omen/impermenance.nix @@ -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 = {