feat: change iso to btrfs

This commit is contained in:
2025-08-05 19:52:58 +02:00
parent 79b4a615f0
commit ba9ef3913d
3 changed files with 51 additions and 8 deletions

View File

@@ -33,7 +33,7 @@
${utillinux}/bin/sfdisk --wipe=always $dev <<-END
label: gpt
name=BOOT, size=512MiB, type=C12A7328-F81F-11D2-BA4B-00A0C93EC93B
name=BOOT, size=1024MiB, type=C12A7328-F81F-11D2-BA4B-00A0C93EC93B
name=NIXOS
END
mkfs.fat -F 32 -n boot /dev/disk/by-partlabel/BOOT
@@ -44,11 +44,23 @@
wait-for mkfs.fat -F 32 -n boot /dev/disk/by-partlabel/BOOT
wait-for [ -b /dev/disk/by-partlabel/NIXOS ]
mkfs.ext4 -L nixos /dev/disk/by-partlabel/NIXOS
mkfs.btrfs -f -L nixos /dev/disk/by-partlabel/NIXOS
sync
mount /dev/disk/by-partlabel/NIXOS /mnt
btrfs subvolume create /mnt/@
btrfs subvolume create /mnt/@nix-store
btrfs subvolume create /mnt/@nix-persist
umount /mnt
sync
mount -o noatime,compress=zstd:3,ssd,discard=async,space_cache=v2,subvol=@ /dev/disk/by-partlabel/NIXOS /mnt
mkdir -p /mnt/nix/{store,persist}
mount -o noatime,compress=zstd:3,ssd,discard=async,space_cache=v2,subvol=@nix-store /dev/disk/by-partlabel/NIXOS /mnt/nix/store
mount -o noatime,compress=zstd:3,ssd,discard=async,space_cache=v2,subvol=@nix-persist /dev/disk/by-partlabel/NIXOS /mnt/nix/persist
mkdir /mnt/boot
wait-for mount /dev/disk/by-label/boot /mnt/boot

View File

@@ -8,6 +8,37 @@
fileSystems."/" = {
device = "/dev/disk/by-partlabel/NIXOS";
fsType = "ext4";
fsType = "btrfs";
options = [
"subvol=@"
"ssd"
"compress=zstd:3"
"discard=async"
"noatime"
];
};
fileSystems."/nix/store" = {
device = "/dev/disk/by-uuid/";
fsType = "btrfs";
options = [
"subvol=@nix-store"
"ssd"
"compress=zstd:3"
"discard=async"
"noatime"
];
};
fileSystems."/nix/persist" = {
device = "/dev/disk/by-partlabel/NIXOS";
fsType = "btrfs";
options = [
"subvol=@nix-persist"
"ssd"
"compress=zstd:3"
"discard=async"
"noatime"
];
};
}

View File

@@ -1 +1 @@
/nix/store/awr76nk2v9gambbksl4lj2z1f30b595i-nixos-23.05.4974.d2e4de209881-x86_64-linux.iso
/nix/store/w455axi159v2i9csmq4cryqq6kxwvzr1-nixos-minimal-25.05.807313.59e69648d345-x86_64-linux.iso