!oNSIfazDqEcwhcOjSL:matrix.org

disko

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

Load older messages


SenderMessageTime
4 Jan 2025
@bl1nk:matrix.orgbl1nk Previously I used nixos-infect which also generated fileSystems.*, I guess I'll have to write that myself now? 15:20:37
@bl1nk:matrix.orgbl1nkAh, reading the docs helps :) https://github.com/nix-community/disko/blob/master/docs/quickstart.md#step-7-complete-the-nixos-installation15:24:38
@kranzes:matrix.org@kranzes:matrix.org left the room.15:29:36
@phaer:matrix.orgphaerIf you do, you are able to use the fileSystems disko creates for your from your disko config. That's about the only difference, disko won't run again or so by including it into your config22:57:31
5 Jan 2025
@bl1nk:matrix.orgbl1nk
In reply to@phaer:matrix.org
If you do, you are able to use the fileSystems disko creates for your from your disko config. That's about the only difference, disko won't run again or so by including it into your config
I went and ran nixos-generate-config on the host to get back a hardware-configuration.nix with fileSystems.* defined if that's what you mean?
12:53:34
@lassulus:lassul.uslassulusyeah, those usually conflict with disko, you can run nixos-generate-config with --no-filesystems13:12:28
6 Jan 2025
@raj-magesh:matrix.orgRaj

I'm trying to use the disko-install command to create a custom bootable USB that has an entire NixOS system (including persistent storage and access to git and neovim, plus a few other goodies).

After running sudo nix run 'github:nix-community/disko/latest#disko-install' -- --flake .#image --disk os /dev/sdc, things seem to get built/copied etc., but it finally halts with this error:

My disko (and NixOS configuration) is pretty simple and the problem occurs even with a minimal configuration (so I don't think it's the issue) but I can share it if required.
00:47:39
@raj-magesh:matrix.orgRaj *

Sorry, mini-bump:

I'm trying to use the disko-install command to create a custom bootable USB that has an entire NixOS system (including persistent storage and access to git and neovim, plus a few other goodies).

After running sudo nix run 'github:nix-community/disko/latest#disko-install' -- --flake .#image --disk os /dev/sdc, things seem to get built/copied etc., but it finally halts with this error:

efiSysMountPoint = '/boot' is not a mounted partition. Is the path configured correctly?
Traceback (most recent call last):
  File "/nix/store/diy6lcklb9r4k18l6plg6yj9chn3pg19-systemd-boot/bin/systemd-boot", line 431, in <module>
    main()
  File "/nix/store/diy6lcklb9r4k18l6plg6yj9chn3pg19-systemd-boot/bin/systemd-boot", line 411, in main
    run([CHECK_MOUNTPOINTS])
  File "/nix/store/diy6lcklb9r4k18l6plg6yj9chn3pg19-systemd-boot/bin/systemd-boot", line 58, in run
    return subprocess.run(cmd, check=True, text=True, stdout=stdout)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/c9m6yd8fg1flz2j5r4bif1ib5j20a0cy-python3-3.12.8/lib/python3.12/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/nix/store/686vaqa40l0vxcp1ll54cbvlrmn9kn55-check-mountpoints']' returned non-zero exit status 1.
Failed to install bootloader
disko-install failed
rmdir: failed to remove '/mnt/disko-install-root': Directory not empty

My disko (and NixOS configuration) is pretty simple and the problem occurs even with a minimal configuration:

{
  disko.devices = {
    nodev."/" = {
      fsType = "tmpfs";
      mountOptions = [
        "size=2G"
        "defaults"
        "mode=755"
      ];
    };
    nodev."/home/raj" = {
      fsType = "tmpfs";
      mountOptions = [
        "size=2G"
        "defaults"
        "mode=777"
      ];
    };
    disk = {
      os = {
        imageName = "nixos-usb-stick";
        imageSize = "60G";
        type = "disk";
        content = {
          type = "gpt";
          partitions = {
            ESP = {
              type = "EF00";
              priority = 0;
              end = "1G";
              content = {
                type = "filesystem";
                format = "vfat";
                mountpoint = "/boot";
                mountOptions = ["defaults" "umask=0077"];
              };
            };
            root = {
              priority = 1;
              end = "-0";
              content = {
                type = "luks";
                name = "root";
                initrdUnlock = true;
                extraFormatArgs = ["--pbkdf argon2id"];
                content = {
                  type = "btrfs";
                  extraArgs = ["-f"];
                  subvolumes = {
                    "/nix" = {
                      mountpoint = "/nix";
                      mountOptions = ["compress=zstd" "noatime"];
                    };
                    "/persist" = {
                      mountpoint = "/persist";
                      mountOptions = ["compress=zstd" "noatime"];
                    };
                    "/data" = {
                      mountpoint = "/data";
                      mountOptions = ["compress=zstd" "noatime"];
                    };
                  };
                };
              };
            };
          };
        };
      };
    };
  };
}

Is there anything obvious I'm missing?

00:49:13
@raj-magesh:matrix.orgRaj *

Sorry, mini-bump:

I'm trying to use the disko-install command to create a custom bootable USB that has an entire NixOS system (including persistent storage and access to git and neovim, plus a few other goodies).

After running sudo nix run 'github:nix-community/disko/latest#disko-install' -- --flake .#image --disk os /dev/sdc, things seem to get built/copied etc., but it finally halts with this error:

efiSysMountPoint = '/boot' is not a mounted partition. Is the path configured correctly?
Traceback (most recent call last):
  File "/nix/store/diy6lcklb9r4k18l6plg6yj9chn3pg19-systemd-boot/bin/systemd-boot", line 431, in <module>
    main()
  File "/nix/store/diy6lcklb9r4k18l6plg6yj9chn3pg19-systemd-boot/bin/systemd-boot", line 411, in main
    run([CHECK_MOUNTPOINTS])
  File "/nix/store/diy6lcklb9r4k18l6plg6yj9chn3pg19-systemd-boot/bin/systemd-boot", line 58, in run
    return subprocess.run(cmd, check=True, text=True, stdout=stdout)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/c9m6yd8fg1flz2j5r4bif1ib5j20a0cy-python3-3.12.8/lib/python3.12/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/nix/store/686vaqa40l0vxcp1ll54cbvlrmn9kn55-check-mountpoints']' returned non-zero exit status 1.
Failed to install bootloader
disko-install failed
rmdir: failed to remove '/mnt/disko-install-root': Directory not empty

My disko (and NixOS configuration) is pretty simple and the problem occurs even with a minimal configuration:

{
  disko.devices = {
    nodev."/" = {
      fsType = "tmpfs";
      mountOptions = [
        "size=2G"
        "defaults"
        "mode=755"
      ];
    };
    nodev."/home/raj" = {
      fsType = "tmpfs";
      mountOptions = [
        "size=2G"
        "defaults"
        "mode=777"
      ];
    };
    disk = {
      os = {
        imageName = "nixos-usb-stick";
        imageSize = "60G";
        type = "disk";
        content = {
          type = "gpt";
          partitions = {
            ESP = {
              type = "EF00";
              priority = 0;
              end = "1G";
              content = {
                type = "filesystem";
                format = "vfat";
                mountpoint = "/boot";
                mountOptions = ["defaults" "umask=0077"];
              };
            };
            root = {
              priority = 1;
              end = "-0";
              content = {
                type = "luks";
                name = "root";
                initrdUnlock = true;
                extraFormatArgs = ["--pbkdf argon2id"];
                content = {
                  type = "btrfs";
                  extraArgs = ["-f"];
                  subvolumes = {
                    "/nix" = {
                      mountpoint = "/nix";
                      mountOptions = ["compress=zstd" "noatime"];
                    };
                    "/persist" = {
                      mountpoint = "/persist";
                      mountOptions = ["compress=zstd" "noatime"];
                    };
                    "/data" = {
                      mountpoint = "/data";
                      mountOptions = ["compress=zstd" "noatime"];
                    };
                  };
                };
              };
            };
          };
        };
      };
    };
  };
}

Is there anything obvious I'm missing?

19:29:14
7 Jan 2025
@rts-kaede:thewired.chかえでちゃん joined the room.11:42:04
@rts-kaede:thewired.chかえでちゃんHello, do disko supports luks2? I see documentation for luks but not luks211:43:40
@lassulus:lassul.uslassuluscryptsetup defaults to LUKS2, so we more or less only support LUKS211:51:35
@sigmasquadron:matrix.orgSigmaSquadron changed their display name from SigmaSquadron to SigmaSquadron (Away until 2024-01-12).19:35:51
@renato-trevisan:matrix.orgRenato Trevisan set a profile picture.21:58:46
9 Jan 2025
@intergalactic-turtle-fucker:arcticfoxes.netIntergalacticTurtleFucker changed their display name from IntergalacticTurtleFucker to ColdSideOfYourPillow.03:00:25
@intergalactic-turtle-fucker:arcticfoxes.netIntergalacticTurtleFucker changed their profile picture.03:00:33
@lgcl:lgcl.delgcl (she/they) joined the room.13:24:48
10 Jan 2025
@laurynasp:matrix.orglaurynasp joined the room.19:50:23
@sigmasquadron:matrix.orgSigmaSquadron changed their display name from SigmaSquadron (Away until 2024-01-12) to SigmaSquadron (Away until 2024-01-11).22:15:58
@sigmasquadron:matrix.orgSigmaSquadron changed their display name from SigmaSquadron (Away until 2024-01-11) to SigmaSquadron (Away until 2025-01-11).22:43:36
@zvzg:matrix.orgSáviohttps://github.com/nix-community/disko/pull/936 minor fix23:32:18
@zvzg:matrix.orgSáviohttps://github.com/nix-community/disko/pull/923/files I noticed this one. It's a significant typo, since it breaks the PostVM hook from working23:33:13
11 Jan 2025
@orzklv:matrix.orgOrzklv left the room.04:07:41
@nam3l33ss:matrix.org·☽•Nameless☆•777 · ± changed their profile picture.04:42:58
@intergalactic-turtle-fucker:arcticfoxes.netIntergalacticTurtleFucker removed their profile picture.10:09:00
@intergalactic-turtle-fucker:arcticfoxes.netIntergalacticTurtleFucker removed their display name ColdSideOfYourPillow.10:09:07
@intergalactic-turtle-fucker:arcticfoxes.netIntergalacticTurtleFucker left the room.10:09:38
@sigmasquadron:matrix.orgSigmaSquadron changed their display name from SigmaSquadron (Away until 2025-01-11) to SigmaSquadron.15:06:55
@10leej:matrix.org@10leej:matrix.org left the room.18:45:25
@pandapip1:matrix.orgpandapip1 joined the room.21:23:12

Show newer messages


Back to Room ListRoom Version: 10