caramel/filesystem: store persist on separate drive

This commit is contained in:
LavaDesu 2022-02-13 12:53:19 +07:00
parent 1d6d52d3e7
commit 11350fb5c2
Signed by: cilly
GPG key ID: 6500251E087653C9

View file

@ -1,7 +1,7 @@
{ config, ... }: { config, ... }:
let let
bind = src: { bind = src: {
depends = [ "/nix" ]; depends = [ "/persist" ];
device = src; device = src;
fsType = "none"; fsType = "none";
neededForBoot = true; neededForBoot = true;
@ -21,8 +21,15 @@ in {
options = [ "defaults" "noatime" ]; options = [ "defaults" "noatime" ];
}; };
"/var/persist" = bind "/nix/persist"; "/persist" = {
"/var/log/journal" = bind "/nix/persist/journal"; device = "/dev/disk/by-label/PI_HDD";
"/boot" = bind "/nix/persist/boot"; fsType = "ext4";
options = [ "defaults" "relatime" ];
neededForBoot = true;
};
"/var/persist" = bind "/persist";
"/var/log/journal" = bind "/persist/journal";
"/boot" = (bind "/nix/persist/boot") // { depends = [ "/nix" ]; };
}; };
} }