fix: do not mount home in a btrfs volume
This ensures Impermanence manages /home instead of btrfs. This allows the tmpfs to work as expected
This commit is contained in:
parent
61671baedc
commit
c75b0e1322
@ -43,12 +43,6 @@
|
|||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = [ "subvol=@nix" "compress=zstd" "noatime" ];
|
options = [ "subvol=@nix" "compress=zstd" "noatime" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
"/home" = {
|
|
||||||
device = "/dev/disk/by-label/NixOS-Primary";
|
|
||||||
fsType = "btrfs";
|
|
||||||
options = [ "subvol=@home" "compress=zstd" "noatime" ];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -50,9 +50,7 @@ mkfs.btrfs -L "${LABEL_BTRFS}" "${CRYPT_PATH}"
|
|||||||
mount -t btrfs "${CRYPT_PATH}" /mnt
|
mount -t btrfs "${CRYPT_PATH}" /mnt
|
||||||
|
|
||||||
# Create our subvolumes
|
# Create our subvolumes
|
||||||
for subvol in "home" "nix"; do
|
btrfs subvolume create "/mnt/@nix"
|
||||||
btrfs subvolume create "/mnt/@${subvol}"
|
|
||||||
done
|
|
||||||
umount /mnt
|
umount /mnt
|
||||||
|
|
||||||
### Final Mountings
|
### Final Mountings
|
||||||
@ -60,7 +58,7 @@ umount /mnt
|
|||||||
mount -t tmpfs -o mode=755 none /mnt
|
mount -t tmpfs -o mode=755 none /mnt
|
||||||
|
|
||||||
# Create our directories
|
# Create our directories
|
||||||
mkdir /mnt/{"boot","nix","home"}
|
mkdir /mnt/{"boot","nix"}
|
||||||
# Mount our boot partition
|
# Mount our boot partition
|
||||||
mount -t vfat -o defaults,noatime "${DISK_EXT}1" /mnt/boot
|
mount -t vfat -o defaults,noatime "${DISK_EXT}1" /mnt/boot
|
||||||
|
|
||||||
@ -69,7 +67,6 @@ mount -t vfat -o defaults,noatime "${DISK_EXT}1" /mnt/boot
|
|||||||
# many cases ZLO is more performant, especially when writing, than ZSTD while having a somewhat worse comrpession ratio.
|
# many cases ZLO is more performant, especially when writing, than ZSTD while having a somewhat worse comrpession ratio.
|
||||||
# WARN: ZLO *may* be a good solution, it can be VERY slow on incompressible data. Something to keep in mind.
|
# WARN: ZLO *may* be a good solution, it can be VERY slow on incompressible data. Something to keep in mind.
|
||||||
mount -t btrfs -o noatime,compress=zstd,subvol=@nix "${CRYPT_PATH}" /mnt/nix
|
mount -t btrfs -o noatime,compress=zstd,subvol=@nix "${CRYPT_PATH}" /mnt/nix
|
||||||
mount -t btrfs -o noatime,compress=zstd,subvol=@home "${CRYPT_PATH}" /mnt/home
|
|
||||||
|
|
||||||
mkdir -p /mnt/nix/persist
|
mkdir -p /mnt/nix/persist
|
||||||
### Install NixOS
|
### Install NixOS
|
||||||
|
Loading…
Reference in New Issue
Block a user