diff options
Diffstat (limited to 'tvix/boot/default.nix')
-rw-r--r-- | tvix/boot/default.nix | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/tvix/boot/default.nix b/tvix/boot/default.nix index 85995ffbf2c5..60eb2f1b7608 100644 --- a/tvix/boot/default.nix +++ b/tvix/boot/default.nix @@ -1,13 +1,16 @@ -{ depot, pkgs, ... }: +{ lib, pkgs, ... }: rec { # A binary that sets up /nix/store from virtiofs, lists all store paths, and # powers off the machine. - tvix-init = depot.nix.buildGo.program { + tvix-init = pkgs.buildGoModule rec { name = "tvix-init"; - srcs = [ - ./tvix-init.go - ]; + src = lib.fileset.toSource { + root = ./.; + fileset = ./tvix-init.go; + }; + vendorHash = null; + postPatch = "go mod init ${name}"; }; # A kernel with virtiofs support baked in @@ -99,7 +102,7 @@ rec { --memory mergeable=on,shared=on,size=$CH_MEM_SIZE \ --console null \ --serial tty \ - --kernel ${kernel.dev}/vmlinux \ + --kernel ${kernel}/${pkgs.stdenv.hostPlatform.linux-kernel.target} \ --initramfs ${initrd} \ --cmdline "console=ttyS0 $CH_CMDLINE" \ --fs tag=tvix,socket=$tempdir/tvix.sock,num_queues=''${CH_NUM_CPU},queue_size=512 |