From 11350fb5c2be4c8951fed49006fbf72ef2ba71e0 Mon Sep 17 00:00:00 2001 From: LavaDesu Date: Sun, 13 Feb 2022 12:53:19 +0700 Subject: [PATCH] caramel/filesystem: store persist on separate drive --- hosts/caramel/filesystem.nix | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/hosts/caramel/filesystem.nix b/hosts/caramel/filesystem.nix index 47aa793..e2b9912 100644 --- a/hosts/caramel/filesystem.nix +++ b/hosts/caramel/filesystem.nix @@ -1,7 +1,7 @@ { config, ... }: let bind = src: { - depends = [ "/nix" ]; + depends = [ "/persist" ]; device = src; fsType = "none"; neededForBoot = true; @@ -21,8 +21,15 @@ in { options = [ "defaults" "noatime" ]; }; - "/var/persist" = bind "/nix/persist"; - "/var/log/journal" = bind "/nix/persist/journal"; - "/boot" = bind "/nix/persist/boot"; + "/persist" = { + device = "/dev/disk/by-label/PI_HDD"; + fsType = "ext4"; + options = [ "defaults" "relatime" ]; + neededForBoot = true; + }; + + "/var/persist" = bind "/persist"; + "/var/log/journal" = bind "/persist/journal"; + "/boot" = (bind "/nix/persist/boot") // { depends = [ "/nix" ]; }; }; }