| 16 May 2026 |
| Sofus Lind joined the room. | 22:58:54 |
Sofus Lind | How do i / can i use disko to only manage one specific partiiton? I have a 4 partitions 1 is boot, 2 + 3 is windows, and 4 is the partiiton i want to manage in disko, so that i can declaratively setup nixos with preservation. | 23:02:05 |
| 17 May 2026 |
| palo joined the room. | 08:40:32 |
| @mrvandalo:terranix.org left the room. | 08:40:37 |
| 18 May 2026 |
not-jack | Does anyone know why my root filesystem is not being imported with zfs? | 10:16:23 |
not-jack |  Download image.png | 10:16:36 |
not-jack | i'm getting this: | 10:16:37 |
magic_rb | Enable emergency access and check the logs | 10:21:44 |
Enzime | could be due to boot.zfs.forceImportRoot changing default value, what stateVersion is your NixOS? | 11:08:34 |
Enzime | https://github.com/NixOS/nixpkgs/pull/495581 | 11:09:27 |
not-jack | deploying a new image now :) | 11:10:07 |
not-jack | tested with forceImportRoot set to true, didn't work | 11:10:25 |
| mdietrich joined the room. | 14:43:28 |
mdietrich | Can I get a vmWithDisko type setup, but with the impure --extra-files of disko-install or --post-format-files of diskoImagesScript? I've tried for days to get the diskoImagesScript working instead of diskoImages by overriding the system.build.vmWithDisko script, but could not get it to work. | 14:58:49 |
| @thou.vow:matrix.org left the room. | 22:36:02 |
mdietrich | I've cooked something up which does what I want:
let
vmVariantModule =
{
config,
pkgs,
lib,
...
}:
let
ovmf = pkgs.OVMF.override { secureBoot = false; };
in
{
config.system.build.vmWithDiskoSecrets = (
pkgs.writers.writeBashBin "disko-vm"
{
makeWrapperArgs = [
"--prefix"
"PATH"
":"
"${lib.makeBinPath [
pkgs.qemu_kvm
pkgs.coreutils
]}"
];
}
''
set -efux
# ---------- argument handling ----------
usage() {
echo "Usage: $0 --keyfile <path> [--boot-location <dest>] [--mem 4G] [--smp 2]"
echo ""
echo " --keyfile Path to the keyfile to inject (required)"
echo " --boot-location Destination path inside the image (default: /run/secret)"
echo " --mem QEMU RAM (default: 4G)"
echo " --smp QEMU vCPUs (default: 2)"
exit 1
}
KEYFILE=""
BOOT_LOCATION="/run/secret"
MEM="4G"
SMP="2"
while [[ $# -gt 0 ]]; do
case "$1" in
--keyfile) KEYFILE="$2"; shift 2 ;;
--boot-location) BOOT_LOCATION="$2"; shift 2 ;;
--mem) MEM="$2"; shift 2 ;;
--smp) SMP="$2"; shift 2 ;;
*) usage ;;
esac
done
if [[ -z "$KEYFILE" ]]; then
echo "Error: --keyfile is required."
usage
fi
# ---------- build image ----------
WORKDIR=$(mktemp -d /tmp/vm-XXXXXX)
trap 'rm -rf "$WORKDIR"' EXIT
echo "[vm-disko] Building disko image in $WORKDIR …"
# diskoImagesScript writes <hostName>.raw (or similar) into the cwd.
pushd "$WORKDIR" > /dev/null
${config.system.build.diskoImagesScript} --post-format-files "$KEYFILE" "$BOOT_LOCATION"
popd > /dev/null
# Find the raw image produced (disko names it after the disk label,
# so we just grab the first .raw file in the workdir).
IMAGE=$(find "$WORKDIR" -maxdepth 1 -name '*.raw' | head -n1)
if [[ -z "$IMAGE" ]]; then
echo "Error: no .raw image found after diskoImagesScript."
exit 1
fi
echo "[vm-disko] Booting $IMAGE …"
# ---------- boot in QEMU ----------
exec qemu-system-x86_64 \
-enable-kvm \
-m "$MEM" \
-cpu max \
-smp "$SMP" \
-netdev user,id=net0,hostfwd=tcp::2222-:22 \
-device virtio-net-pci,netdev=net0 \
-drive if=pflash,format=raw,readonly=on,file=${ovmf.firmware} \
-drive if=pflash,format=raw,readonly=on,file=${ovmf.variables} \
-drive "if=virtio,format=raw,file=$IMAGE" \
"$@"
''
);
};
vmVariantWithDiskoSecrets = extendModules {
modules = [
vmVariantModule
];
};
in
{
options.virtualisation.vmVariantWithDiskoSecrets = lib.mkOption {
description = ''
Machine configuration to be added for the vm script available at `.system.build.vmWithDiskoSecrets`.
'';
inherit (vmVariantWithDiskoSecrets) type;
default = { };
visible = "shallow";
};
config.system.build.vmWithDiskoSecrets = lib.mkDefault config.virtualisation.vmVariantWithDiskoSecrets.system.build.vmWithDiskoSecrets;
};
| 22:55:31 |
| 19 May 2026 |
| todo joined the room. | 15:41:09 |
| amadaluzia changed their profile picture. | 20:58:32 |
| 20 May 2026 |
| interru joined the room. | 20:02:52 |
| 21 May 2026 |
| Pascal Sthamer changed their profile picture. | 09:31:11 |
| Pascal Sthamer changed their profile picture. | 09:32:36 |
mdietrich | Actually having another question: I can install my custom aarch64-linux system on an USB stick for Raspberry Pi usage with disko-install (using the PR #1190), but trying to create the image by using either diskoImages or diskoImagesScript does not work and fails due to virtiofs problems. Anyone hit that also and can help here? | 21:17:53 |
| 22 May 2026 |
| Jon Hermansen changed their display name from jonhermansen to Jon Hermansen. | 19:18:46 |
| 23 May 2026 |
| mtmn joined the room. | 15:23:04 |
| 24 May 2026 |
| nephesh joined the room. | 00:18:54 |
| nephesh set a profile picture. | 04:33:34 |
| 26 May 2026 |
| ·☽•Nameless☆•777 · ± changed their profile picture. | 05:42:06 |
| 27 May 2026 |
| Barnett joined the room. | 08:27:00 |
| Barnett changed their display name from Barnett Trzcinski 💕 to Barnett. | 08:27:57 |
| Barnett set a profile picture. | 08:59:07 |