Update disko virtual machine configuration
parent
84ec0824e8
commit
7b872f4596
|
@ -5,11 +5,11 @@
|
||||||
1. Build the virtual machine
|
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
|
2. Run the virtual machine
|
||||||
|
|
||||||
```
|
```
|
||||||
QEMU_KERNEL_PARAMS=console=ttyS0 ./result/bin/run-nixos-vm -nographic; reset
|
./result/bin/disko-vm
|
||||||
```
|
```
|
||||||
|
|
|
@ -22,6 +22,20 @@
|
||||||
|
|
||||||
disko = {
|
disko = {
|
||||||
devices.disk.main.device = "/dev/vda";
|
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;
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
@ -32,7 +46,9 @@
|
||||||
users.h = ./home.nix;
|
users.h = ./home.nix;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
services.qemuGuest.enable = true;
|
||||||
services.spice-vdagentd.enable = true;
|
services.spice-vdagentd.enable = true;
|
||||||
|
|
||||||
services.openssh = {
|
services.openssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
startWhenNeeded = true;
|
startWhenNeeded = true;
|
||||||
|
|
Loading…
Reference in New Issue