!oNSIfazDqEcwhcOjSL:matrix.org

disko

349 Members
disko - declarative disk partitioning - https://github.com/nix-community/disko87 Servers

Load older messages


SenderMessageTime
30 Nov 2025
@not-jack:matrix.orgnot-jackI've tried remounting the store with more space, but that doesn't seem to do anything 20:00:00
@not-jack:matrix.orgnot-jackAnyone have tips? 20:00:07
@not-jack:matrix.orgnot-jackActually, looks like i'm oom'ing now20:06:19
@chickeniq:matrix.orgChickenIQ joined the room.21:39:45
@chickeniq:matrix.orgChickenIQI've been trying to generate a disk image for my pi 4 with disko, but i keep getting an error: "Firmware not found" Any idea on how i could fix it? Repo: https://github.com/ChickenIQ/NixOSPI421:45:53
@chickeniq:matrix.orgChickenIQ* I've been trying to generate a disk image for my pi 4 with disko, but i keep getting an error on boot: "Firmware not found" Any idea on how i could fix it? Repo: https://github.com/ChickenIQ/NixOSPI421:47:01
1 Dec 2025
@chickeniq:matrix.orgChickenIQ

this seems to be enough to get it to work

          esp = {
            size = "1024M";
            type = "EF00";
            content = {
              format = "vfat";
              type = "filesystem";
              mountpoint = "/boot";
              mountOptions = [ "umask=0077" ];
              postMountHook =
                let
                  configTxt = pkgs.writeText "config.txt" ''
                    [pi4]
                    kernel=u-boot-rpi4.bin
                    disable_overscan=1
                    enable_gic=1
                    arm_boost=1

                    [all]
                    avoid_warnings=1
                    enable_uart=1
                    arm_64bit=1
                  '';
                in
                toString (
                  pkgs.writeScript "postMountHook.sh" ''
                    (cd ${pkgs.raspberrypifw}/share/raspberrypi/boot && cp bootcode.bin fixup4.dat start4.elf bcm2711-*.dtb /mnt/boot/)
                    cp ${pkgs.ubootRaspberryPi4_64bit}/u-boot.bin /mnt/boot/u-boot-rpi4.bin
                    cp ${configTxt} /mnt/boot/config.txt
                  ''
                );
            };
          };
00:20:12
@chickeniq:matrix.orgChickenIQ

proper hack, works without disko too

{
  config,
  pkgs,
  lib,
  ...
}:

let
  installBootLoader =
    (import (pkgs.path + "/nixos/modules/system/boot/loader/generic-extlinux-compatible") {
      inherit config lib pkgs;
    }).config.content.system.build.installBootLoader;

  populateFirmware =
    (import (pkgs.path + "/nixos/modules/installer/sd-card/sd-image-aarch64.nix") {
      inherit config lib pkgs;
    }).sdImage.populateFirmwareCommands;

  installCmd = pkgs.writeShellScript "populate-boot.sh" ''
    set -e && export PATH=${pkgs.coreutils}/bin:$PATH
    ${installBootLoader} "$@"

    ln -s "/boot" "$NIX_BUILD_TOP/firmware" 
    cd "$NIX_BUILD_TOP" && ${populateFirmware} 
    echo "include usercfg.txt" >> /boot/config.txt
  '';
in
{
  system.build.installBootLoader = lib.mkForce installCmd;
}
03:27:03
@chickeniq:matrix.orgChickenIQ *

proper hack, works without disko too

{
  config,
  pkgs,
  lib,
  ...
}:

let
  installBootLoader =
    (import (pkgs.path + "/nixos/modules/system/boot/loader/generic-extlinux-compatible") {
      inherit config lib pkgs;
    }).config.content.system.build.installBootLoader;

  populateFirmware =
    (import (pkgs.path + "/nixos/modules/installer/sd-card/sd-image-aarch64.nix") {
      inherit config lib pkgs;
    }).sdImage.populateFirmwareCommands;

  installCmd = pkgs.writeShellScript "populate-boot.sh" ''
    set -e && export PATH=${pkgs.coreutils}/bin:$PATH
    ${installBootLoader} "$@"

    ln -s "/boot" "$NIX_BUILD_TOP/firmware" 
    cd "$NIX_BUILD_TOP" && ${populateFirmware} 
    echo "include usercfg.txt" >> /boot/config.txt
  '';
in
{
  system.build.installBootLoader = lib.mkForce installCmd;
}
03:27:14
@stooj:matrix.orgstooj joined the room.16:54:37
@stooj:matrix.orgstoojRedacted or Malformed Event17:32:21
@stooj:matrix.orgstooj

Possibly a general flake question: what is the syntax for applying a flake from a non-github repo and using a specific branch?

So far I'm trying:

nix run --extra-experimental-features 'nix-command flakes' 'github:nix-community/disko/latest#disko-install' -- --write-efi-boot-entries --flake 'https://codeberg.org/higara/legacy-nix-configuration.git?ref=add-klaes#klaes' --disk nvme0 /dev/nvme0n1

And getting:

error: Failed to open archive (Unrecognizde archive format)
.disko-install-wrapped: line 234: artifacts[1]: unbound variable
17:39:25
@stooj:matrix.orgstooj *

Possibly a general flake question: what is the syntax for applying a flake from a non-github repo and using a specific branch?

So far I'm trying:

nix run --extra-experimental-features 'nix-command flakes' \
    'github:nix-community/disko/latest#disko-install' -- \
    --write-efi-boot-entries \
    --flake 'https://codeberg.org/higara/legacy-nix-configuration.git?ref=add-klaes#klaes' \
    --disk nvme0 /dev/nvme0n1

And getting:

error: Failed to open archive (Unrecognizde archive format)
.disko-install-wrapped: line 234: artifacts[1]: unbound variable
17:40:32
@berrij:fairydust.spaceBerriJI guess you need 'git+https://...' instead of just starting directly with 'https://'17:44:09
@stooj:matrix.orgstoojThanks, I will try that.17:45:08

There are no newer messages yet.


Back to Room ListRoom Version: 10