test: impermanence

This commit is contained in:
Nick 2025-11-05 12:27:58 -06:00
parent 96c02ac2cb
commit 5336cb8ebb

View file

@ -8,46 +8,50 @@ let
inherit (flake.config.people) user0; inherit (flake.config.people) user0;
in in
{ {
fileSystems = { fileSystems =
"/" = { let
device = "/dev/disk/by-uuid/8596aaba-338f-1f9d-ba9d-a63bcbc38523"; rootDevice = "/dev/disk/by-uuid/8596aaba-338f-4f9d-ba9d-a63bcbc38523";
fsType = "btrfs"; in
options = [ {
"subvol=root" "/" = {
]; device = rootDevice;
}; fsType = "btrfs";
options = [
"subvol=root"
];
};
"/nix" = { "/nix" = {
device = "/dev/disk/by-uuid/8596aaba-338f-1f9d-ba9d-a63bcbc38523"; device = rootDevice;
fsType = "btrfs"; fsType = "btrfs";
options = [ options = [
"subvol=nix" "subvol=nix"
]; ];
}; };
"/persistent" = { "/persistent" = {
device = "/dev/disk/by-uuid/8596aaba-338f-1f9d-ba9d-a63bcbc38523"; device = rootDevice;
fsType = "btrfs"; fsType = "btrfs";
neededForBoot = true; neededForBoot = true;
options = [ options = [
"subvol=persistent" "subvol=persistent"
]; ];
}; };
"/boot" = { "/boot" = {
device = "/dev/disk/by-uuid/7328-07C6"; device = "/dev/disk/by-uuid/7328-07C6";
fsType = "vfat"; fsType = "vfat";
options = [ options = [
"fmask=0077" "fmask=0077"
"dmask=0077" "dmask=0077"
]; ];
}; };
"/mnt/storage" = { "/mnt/storage" = {
device = "/dev/disk/by-label/storage"; device = "/dev/disk/by-label/storage";
fsType = "ext4"; fsType = "ext4";
};
}; };
};
boot.initrd.postResumeCommands = lib.mkAfter '' boot.initrd.postResumeCommands = lib.mkAfter ''
mkdir /btrfs_tmp mkdir /btrfs_tmp
mount -o subvolid=5 /dev/sdb2 /btrfs_tmp mount -o subvolid=5 /dev/sdb2 /btrfs_tmp