I want the module to build netboot.nix and use it like this:
let
netboot = pkgs.callPackage ./netboot.nix {};
in
[...]
kernel = "${netboot}/bzImage";
I can build netboot.nix fine by running nix-build -E 'with import <nixpkgs> {}; callPackage ./netboot.nix {}' but if I try to build the module with nixos-rebuildI get:
$ sudo nixos-rebuild switch -I nixpkgs=~/nixpkgs
building Nix...
building the system configuration...
error: file '/home/bbigras/nixpkgs/nixos/tests/vde1.ctl/.05386-00000' has an unsupported type
(use '--show-trace' to show detailed location information)
Sometimes when running tests manually the vde1.ctl directory is left over that causes this error. I have no idea why this happens but rm -rf vde1.ctl worked for me.
Edit: reproducer:
$ cd nixpkgs/nixos/tests
$ ls -d *vde*
zsh: no matches found: *vde*
$ nix-build mediawiki.nix -A driver
/nix/store/n2g5j05na0lqakajji2injv4b2dx2rdh-nixos-test-driver-mediawiki
$ ./result/bin/nixos-test-driver
starting VDE switch for network 1
>>> exit()
cleaning up
(0.00 seconds)
$ ls -d *vde*
vde1.ctl