| 18 Aug 2025 |
Sylvie (They/She) 🏳️⚧️ | ok after a deploy and reboot everything boots up fine! I'm pretty sure there was just something fucky with the state between the disko command and the impure nixos-install | 13:31:34 |
vicnotor | How would one go about setting up a simple BTRFS filesystem with two drives with the default profiles (single for data and raid1 for metadata)? I understand this can be done through Disko with a single partition layout for one drive and then adding the second device to the BTRFS filesystem with btrfs device add /dev/nvme1n1 /, and then balancing the filesystem. I was curious if this can also be done declaratively. My disko config that I've built just now looks as follows, but I don't know if it would work the way I want to (two drives in one balanced BTRFS filesystem):
{
disko.devices = {
disk = {
main = {
type = "disk";
device = "/dev/nvme0n1";
content = {
type = "gpt";
partitions = {
ESP = {
size = "512M";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = ["umask=0077"];
};
};
root = {
size = "100%";
content = {
type = "btrfs";
extraArgs = ["-f"];
subvolumes = {
"/root" = {
mountpoint = "/";
mountOptions = [
"compress=zstd"
"noatime"
];
};
"/home" = {
mountpoint = "/home";
mountOptions = [
"compress=zstd"
"noatime"
];
};
"/nix" = {
mountpoint = "/nix";
mountOptions = [
"compress=zstd"
"noatime"
];
};
"/swap" = {
mountpoint = "/.swapvol";
swap.swapfile.size = "16G";
};
};
};
};
};
};
};
second = {
type = "disk";
device = "/dev/nvme1n1";
content = {
type = "gpt";
partitions = {
root = {
size = "100%";
content = {
type = "btrfs";
};
};
};
};
};
};
};
}
| 13:31:45 |
| @xvwx:matrix.dapp.org.uk left the room. | 13:50:33 |
Sylvie (They/She) 🏳️⚧️ | yeah ok this is getting a bit too annoying, I'll just switch to grub. | 14:21:16 |
Sylvie (They/She) 🏳️⚧️ | I wonder if I can switch bootloaders on a running system... :D | 14:29:49 |
Sylvie (They/She) 🏳️⚧️ | grub says filesystem "fat" does not support embedding ??? | 14:40:20 |
Sylvie (They/She) 🏳️⚧️ | what would a simple grub config that works with the boot-raid1 example look like? 😅 | 14:40:45 |
lassulus | usually you don't need to set anything except efiSupport = true; | 14:54:21 |
Sylvie (They/She) 🏳️⚧️ | what should I set boot.loader.grub.device to? | 14:58:49 |
Sylvie (They/She) 🏳️⚧️ | oh wait, right | 14:59:11 |
Sylvie (They/She) 🏳️⚧️ | there is the grub MBR partition...is that required for an EFI-only system, too? | 14:59:22 |
Sylvie (They/She) 🏳️⚧️ | * what should I set boot.loader.grub.device to? or mirroredBoots...? | 14:59:44 |
Sylvie (They/She) 🏳️⚧️ | this actually worked fwiw, but it feels like a hack | 15:18:52 |
Sylvie (They/She) 🏳️⚧️ | not more of a hack than adding a partition for MBR though | 15:19:16 |
Sylvie (They/She) 🏳️⚧️ | nevermind it didn't | 15:20:34 |