!oNSIfazDqEcwhcOjSL:matrix.org

disko

360 Members
disko - declarative disk partitioning - https://github.com/nix-community/disko93 Servers

Load older messages


SenderMessageTime
8 May 2025
@projectinitiative:matrix.orgprojectinitiativeTotally missed these, life's been pretty hectic these past few weeks, but glad to see the work being pushed forward! 21:46:40
9 May 2025
@sandro:supersandro.deSandro 🐧Why does the gpt type no longer allow referencing disks by-id?23:45:00
@sandro:supersandro.deSandro 🐧I have some existing machines with existing formats and they all don't have partlabel set and adding UUIDs by hand sounds awefull23:45:26
10 May 2025
@lassulus:lassul.uslassulusYou mean uuids for partitions? Otherwise you need to set the device in the disk type?03:41:39
@sandro:supersandro.deSandro 🐧Yep12:20:05
@sandro:supersandro.deSandro 🐧I have some disks formatted as mbdos/bios/whatever, not gpt12:20:49
@sandro:supersandro.deSandro 🐧 And I kinda want to convert to the newer settings format to get rid of the warnings 12:21:06
@sandro:supersandro.deSandro 🐧But I can't really12:21:10
@sandro:supersandro.deSandro 🐧Because I can no longer reference disks by part-id which is the only predictable name when you are not on gpt12:21:37
@sandro:supersandro.deSandro 🐧And partlabel only exists for gpt disks12:21:46
@lassulus:lassul.uslassulusyou can override device on each partition12:45:54
@headb:edwardh.devEdward Hesketh joined the room.18:02:19
@headb:edwardh.devEdward Hesketh changed their display name from Edward Hesketh to headb.19:45:04
@strutztm:strutztm.de@strutztm:strutztm.de left the room.19:50:32
@headb:edwardh.devEdward Hesketh changed their display name from headb to Edward Hesketh.23:32:18
11 May 2025
@nemnix:matrix.org@nemnix:matrix.org removed their profile picture.01:27:21
@zimward:zimward.moezimward joined the room.19:32:47
12 May 2025
@disco_stick:matrix.orgfood style edible product changed their display name from SS Stupid Goals to SS Bullshit Dreams.02:06:31
@noneyescat:matrix.orgmomo joined the room.15:50:06
@noneyescat:matrix.orgmomo

Hello everyone, I'm encountering an issue with disko installation. When trying to run this command on my new machine, I get the following error after some time:

copying path '/nix/store/ccfwxygjrarahgfv5865x2f828sjr5h0-source' from 'https://cache.nixos.org'...
error:
       … while evaluating a branch condition
         at /nix/store/hr8dbsiv7gmyjywz5jhhv3xglmx77i4y-disko/share/disko/cli.nix:108:10:
          107|       diskoEval
          108|     else if hasDiskoModuleFlake then
             |          ^
          109|       (builtins.getFlake flake).nixosConfigurations.${flakeAttr}.config.system.build.${diskoAttr}

       … in the right operand of the OR (||) operator
         at /nix/store/xhhzw2lrzamrmpz056gybwrvd6dxp6nl-yhc8a0a2mvbp8fp53l57i3d5cnz735fc-source/lib/attrsets.nix:168:11:
          167|           n == lenAttrPath
          168|           || (
             |           ^
          169|             let

       … while evaluating definitions from `/nix/store/57zny9al6km8yi7fav67dkf1apmfyw2p-source/hosts':

       … while evaluating definitions from `/nix/store/8lw7ywpxvmmzryn9mnipqhvac4vpwzik-source/modules/perSystem.nix':

       … while evaluating definitions from `/nix/store/57zny9al6km8yi7fav67dkf1apmfyw2p-source/lib, via option perSystem':

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: writing to file: No space left on device
error: Recipe `install` failed on line 2 with exit code 1

I've tried switching to disko-install with this command:

 nix --experimental-features "nix-command flakes" run 'github:nix-community/disko/latest#disko-insta
ll' -- --flake .#server --disk main /dev/sda

But the issue persists.

i have confirmed that my machine have enough RAM and storage space.

16:02:23
@noneyescat:matrix.orgmomoIf I recall correctly, this command used to work properly six months ago. So I'm not entirely sure if there have been any changes to the options that might be causing this issue :(16:08:05
@lassulus:lassul.uslassulushmm, it looks like a nixpkgs bug16:44:06
@ersei:ersei.net@ersei:ersei.net joined the room.19:58:27
@ersei:ersei.net@ersei:ersei.netHey all, is there any specific thing I need to do to use disko with multipath?19:59:49
13 May 2025
@unmolded_can:matrix.orgunmolded_can joined the room.07:57:15
@unmolded_can:matrix.orgunmolded_can

Hi all, struggling though the docs _create zfs* options I eventually got the disko config to work. However, because I have used encrypted zfs root and /nix datasets (across different pools) I have encountered a dependency issue (I think) on boot.
`
zpool = {
zroot = {
type = "zpool";
mode = {
topology={
type = "topology";
vdev = [
{
members = [ "crucialMx500500g1" ];
}
];
};
};
options = {
# Workaround: cannot import 'zroot': I/O error in disko tests
cachefile = "none";
ashift = "12";
};
rootFsOptions = {
mountpoint = "none";
compression = "lz4";
acltype = "posixacl";
xattr = "sa";
atime = "off";
};
postCreateHook = "zfs list -t snapshot -H -o name | grep -E '^zroot@blank$' || zfs snapshot zroot@blank";
datasets = {
root = {
type = "zfs_fs";
mountpoint = "/";
options = {
encryption = "aes-256-gcm";
keyformat = "passphrase";
keylocation = "prompt";
};
};
};
};
# };

    fast = {
      type = "zpool";
      mode = {
      topology={
        type = "topology";
        vdev = [
          {
            mode = "mirror";
            members = [ "samsung990Pro4t1" "samsung990Pro4t2" ];
          }
        ];
      };
      };
      mountpoint = "/mnt/fast";
      options = {
        ashift = "12";
      };
      rootFsOptions = {
        mountpoint = "none";
        atime = "off";
        compression = "lz4";

        encryption = "aes-256-gcm";
        keyformat = "hex";
        keylocation = "file:///etc/zfs/keys/fast.hex";
      };
      datasets = {
        nix = {
          type = "zfs_fs";
          mountpoint = "/nix";
          options = {
           compression = "zstd";
          };
        };
        game = {
          type = "zfs_volume";
          size = "1T";
          options = {
            volblocksize = "128K";
          };
          # content = {
          #   type = "filesystem";
          #   format = "ntfs";
          # };
        };
      };
    };
  };

`
Based on the stage 1 boot messages, initrd/linux is loading the key zroot/root via a passphrase, then loading the fast pool key. It can't since the fast pool key is in the zroot/root pool. After failing to load the key it then mounts zroot/root which then now makes the key available.
I have found https://github.com/nix-community/disko/issues/141 but the linked https://github.com/nix-community/disko/pull/218/files only affects creation it seems. Any help would be appreciated.

08:08:10
@unmolded_can:matrix.orgunmolded_can *

Hi all, struggling though the docs _create zfs* options I eventually got the disko config to work. However, because I have used encrypted zfs root and /nix datasets (across different pools) I have encountered a dependency issue (I think) on boot.

`
Based on the stage 1 boot messages, initrd/linux is loading the key zroot/root via a passphrase, then loading the fast pool key. It can't since the fast pool key is in the zroot/root pool. After failing to load the key it then mounts zroot/root which then now makes the key available.
I have found https://github.com/nix-community/disko/issues/141 but the linked https://github.com/nix-community/disko/pull/218/files only affects creation it seems. Any help would be appreciated.

08:09:36
@unmolded_can:matrix.orgunmolded_can *

Hi all, struggling though the docs _create zfs* options I eventually got the disko config to work. However, because I have used encrypted zfs root and /nix datasets (across different pools) I have encountered a dependency issue (I think) on boot.

      zpool = {
        zroot = {
          type = "zpool";
          mode = {
          topology={
            type = "topology";
            vdev = [
              {
                members = [ "crucialMx500500g1" ];
              }
            ];
          };
          };
          options = {
            # Workaround: cannot import 'zroot': I/O error in disko tests
            cachefile = "none";
            ashift = "12";
          };
          rootFsOptions = {
            mountpoint = "none";
            compression = "lz4";
            acltype = "posixacl";
            xattr = "sa";
            atime = "off";
          };
          postCreateHook = "zfs list -t snapshot -H -o name | grep -E '^zroot@blank$' || zfs snapshot zroot@blank";
          datasets = {
            root = {
              type = "zfs_fs";
              mountpoint = "/";
              options = {
                encryption = "aes-256-gcm";
                keyformat = "passphrase";
                keylocation = "prompt";
              };
            };
          };
        };
        # };

        fast = {
          type = "zpool";
          mode = {
          topology={
            type = "topology";
            vdev = [
              {
                mode = "mirror";
                members = [ "samsung990Pro4t1" "samsung990Pro4t2" ];
              }
            ];
          };
          };
          mountpoint = "/mnt/fast";
          options = {
            ashift = "12";
          };
          rootFsOptions = {
            mountpoint = "none";
            atime = "off";
            compression = "lz4";

            encryption = "aes-256-gcm";
            keyformat = "hex";
            keylocation = "file:///etc/zfs/keys/fast.hex";
          };
          datasets = {
            nix = {
              type = "zfs_fs";
              mountpoint = "/nix";
              options = {
               compression = "zstd";
              };
            };
            game = {
              type = "zfs_volume";
              size = "1T";
              options = {
                volblocksize = "128K";
              };
              # content = {
              #   type = "filesystem";
              #   format = "ntfs";
              # };
            };
          };
        };
      };

Based on the stage 1 boot messages, initrd/linux is loading the key zroot/root via a passphrase, then loading the fast pool key. It can't since the fast pool key is in the zroot/root pool. After failing to load the key it then mounts zroot/root which then now makes the key available.
I have found https://github.com/nix-community/disko/issues/141 but the linked https://github.com/nix-community/disko/pull/218/files only affects creation it seems. Any help would be appreciated.

08:10:22
@unmolded_can:matrix.orgunmolded_canDid some more digging into the code and found https://github.com/nix-community/disko/blob/85555d27ded84604ad6657ecca255a03fd878607/lib/types/zfs_fs.nix#L165-L170 which implies there is no way to set https://nixos.org/manual/nixos/stable/options#opt-fileSystems._name_.depends for zfs. I guess I can try adding that config in a seperate file and hope nixos/nixpkgs merges the attributes correctly. Actually rereading the issue I found says to do exactly that (last 2 messages, don't skim). So I guess that is the solution. Use depends directly (though you have to read the code to know to use the zfs mountpoint as the nix attr key) instead of through disko08:31:53
@unmolded_can:matrix.orgunmolded_can * Did some more digging into the code and found https://github.com/nix-community/disko/blob/85555d27ded84604ad6657ecca255a03fd878607/lib/types/zfs_fs.nix#L165-L170 which implies there is no way to set https://nixos.org/manual/nixos/stable/options#opt-fileSystems._name_.depends for zfs. I guess I can try adding that config in a seperate file and hope nixos/nixpkgs merges the attributes correctly. Actually rereading the issue I found says to do exactly that (last 2 messages, don't skim). So I guess that is the solution. Use depends directly instead of through disko 08:35:46

Show newer messages


Back to Room ListRoom Version: 10