!oNSIfazDqEcwhcOjSL:matrix.org

disko

357 Members
disko - declarative disk partitioning - https://github.com/nix-community/disko89 Servers

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


SenderMessageTime
9 Feb 2025
@tired:fairydust.space@tired:fairydust.space left the room.22:51:59
10 Feb 2025
@snipped-paws:matrix.orgsnipped-paws joined the room.05:51:00
@snipped-paws:matrix.orgsnipped-pawsRedacted or Malformed Event05:56:41
@snipped-paws:matrix.orgsnipped-paws

Hello, I am new-ish to NixOS and disko and am trying to get a setup working for my home server. I have this cut-down config that is just supposed to format the single mirror that I plan to install NixOS on top of, but it seems to not correctly create the zfs partition (as well as the zpool and datasets). When I run sudo disko --mode disko disko-config.nix, it appears to work (?), but when I check the partitions in Gnome Disks in the live environment, the content of the partition is listed as "Unknown." The EFI boot partition does appear to be recognized as expected. Any help would be much appreciated!

{
  disko.devices = let
    nixosPartitions = {
      ESP = {
        size = "512M";
        type = "EF00";
        content.type = "filesystem";
        content.format = "vfat";
        content.mountpoint = "/boot";
      };
      zfs = {
        size = "100%";
        content.type = "zfs";
        content.pool = "nixos";
      };
    };
  in {
    disk = {
      # NixOS boot mirror (240GBx2)
      ssd0 = {
        device = "/dev/sda";
        type = "disk";
        content = {
          type = "gpt";
          partitions = nixosPartitions;
        };
      };
      ssd1 = {
        device = "/dev/sdb";
        type = "disk";
        content = {
          type = "gpt";
          partitions = nixosPartitions;
        };
      };
    };
  };

  zpool = {
    # NixOS boot mirror
    nixos = {
      type = "zpool";
      mode = "mirror";
      options = { ashift = "12"; };
      datasets = {
        "root" = {
          type = "zfs_fs";
          mountpoint = "/";
          options = {
            encryption = "aes-256-gcm";
            keyformat = "passphrase";
            keylocation = "prompt";
          };
        };
        "nix" = {
          type = "zfs_fs";
          mountpoint = "/nix";
          options."com.sun:auto-snapshot" = "false";
        };
        "home" = {
          type = "zfs_fs";
          mountpoint = "/home";
          options = {
            encryption = "aes-256-gcm";
            keyformat = "raw";
            keylocation = "file:///etc/zfskey";
          };
        };
      };
    };
  };
}
06:10:38
@lassulus:lassul.uslassulusGnome disks can't show zfs partitions07:16:56
@lassulus:lassul.uslassulusAfaik07:17:01

Show newer messages


Back to Room ListRoom Version: 10