NixOS version: 23.11
I am trying to build an iso for digital ocean. I followed a similar path from this question
But a simpler version. See below
nix-build image.nix
{ pkgs ? import <nixpkgs> { } }:
let config = {
imports = [ <nixpkgs/nixos/modules/virtualisation/digital-ocean-image.nix> ];
};
in
(pkgs.nixos config).digitalOceanImage
With the following result. How can I make this work?
Booting from ROM...
loading kernel modules...isable)... ock
mounting Nix store...
mounting host's temporary directory...
starting stage 2 (/nix/store/qp1a67s1cv4s538qnrwh4s0mxw31rfsk-vm-run-stage2)
tune2fs 1.47.0 (5-Feb-2023)
Setting maximal mount count to -1
Setting interval between checks to 0 seconds
Setting time filesystem last checked to Thu Apr 24 19:26:19 2025
dirname: missing operand
Try 'dirname --help' for more information.
mkdir: missing operand
Try 'mkdir --help' for more information.
[ 1.401166] reboot: Power down
error: builder for '/nix/store/6x5rlrnd8ik0gz906zqww6rqqr1g0hq8-digital-ocean-image.drv' failed with exit code 1;
last 25 log lines:
> WARNING: Image format was not specified for 'nixos.raw' and probing guessed raw.
> Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted.
> Specify the 'raw' format explicitly to remove the restrictions.
> cSeaBIOS (version rel-1.16.3-0-ga6ed6b701f0a-prebuilt.qemu.org)
>
>
> iPXE (http://ipxe.org) 00:03.0 CA00 PCI2.10 PnP PMM+3EFD0C20+3EF30C20 CA00
>
>
>
> Booting from ROM...
> loading kernel modules...isable)... ock
> mounting Nix store...
> mounting host's temporary directory...
> starting stage 2 (/nix/store/qp1a67s1cv4s538qnrwh4s0mxw31rfsk-vm-run-stage2)
> tune2fs 1.47.0 (5-Feb-2023)
> Setting maximal mount count to -1
> Setting interval between checks to 0 seconds
> Setting time filesystem last checked to Thu Apr 24 19:26:19 2025
>
> dirname: missing operand
> Try 'dirname --help' for more information.
> mkdir: missing operand
> Try 'mkdir --help' for more information.
> [ 1.401166] reboot: Power down
For full logs, run 'nix log /nix/store/6x5rlrnd8ik0gz906zqww6rqqr1g0hq8-digital-ocean-image.drv'.