!oNSIfazDqEcwhcOjSL:matrix.org

disko

358 Members
disko - declarative disk partitioning - https://github.com/nix-community/disko91 Servers

You have reached the beginning of time (for this room).


SenderMessageTime
18 Aug 2025
@sylvie:karp.lolSylvie (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-install13:31:34
@vicnotor:matrix.orgvicnotor

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@xvwx:matrix.dapp.org.uk left the room.13:50:33
@sylvie:karp.lolSylvie (They/She) 🏳️‍⚧️yeah ok this is getting a bit too annoying, I'll just switch to grub.14:21:16
@sylvie:karp.lolSylvie (They/She) 🏳️‍⚧️I wonder if I can switch bootloaders on a running system... :D14:29:49
@sylvie:karp.lolSylvie (They/She) 🏳️‍⚧️ grub says filesystem "fat" does not support embedding ??? 14:40:20
@sylvie:karp.lolSylvie (They/She) 🏳️‍⚧️what would a simple grub config that works with the boot-raid1 example look like? 😅14:40:45
@lassulus:lassul.uslassulususually you don't need to set anything except efiSupport = true;14:54:21
@sylvie:karp.lolSylvie (They/She) 🏳️‍⚧️ what should I set boot.loader.grub.device to? 14:58:49
@sylvie:karp.lolSylvie (They/She) 🏳️‍⚧️oh wait, right14:59:11
@sylvie:karp.lolSylvie (They/She) 🏳️‍⚧️there is the grub MBR partition...is that required for an EFI-only system, too?14:59:22
@sylvie:karp.lolSylvie (They/She) 🏳️‍⚧️ * what should I set boot.loader.grub.device to? or mirroredBoots...? 14:59:44
@sylvie:karp.lolSylvie (They/She) 🏳️‍⚧️this actually worked fwiw, but it feels like a hack15:18:52
@sylvie:karp.lolSylvie (They/She) 🏳️‍⚧️not more of a hack than adding a partition for MBR though15:19:16
@sylvie:karp.lolSylvie (They/She) 🏳️‍⚧️nevermind it didn't15:20:34

Show newer messages


Back to Room ListRoom Version: 10