Update disko virtual machine configuration

main
Hektor Misplon 2025-10-05 18:31:47 +02:00
parent 84ec0824e8
commit 7b872f4596
2 changed files with 18 additions and 2 deletions

View File

@ -5,11 +5,11 @@
1. Build the virtual machine
```
nix run -L '.#nixosConfigurations.vm.config.system.build.vmWithDisko'
nix build -L '.#nixosConfigurations.vm.config.system.build.vmWithDisko'
```
2. Run the virtual machine
```
QEMU_KERNEL_PARAMS=console=ttyS0 ./result/bin/run-nixos-vm -nographic; reset
./result/bin/disko-vm
```

View File

@ -22,6 +22,20 @@
disko = {
devices.disk.main.device = "/dev/vda";
devices.disk.main.imageName = "nixos-vm";
devices.disk.main.imageSize = "32G";
};
virtualisation.vmVariantWithDisko = {
virtualisation = {
cores = 8;
memorySize = 16384;
qemu.options = [
"-enable-kvm"
"-cpu host"
"-nographic"
];
};
};
nixpkgs.config.allowUnfree = true;
@ -32,7 +46,9 @@
users.h = ./home.nix;
};
services.qemuGuest.enable = true;
services.spice-vdagentd.enable = true;
services.openssh = {
enable = true;
startWhenNeeded = true;