Skip to content

Commit 3322e25

Browse files
committed
refactor: imports and enable virtualisation options
1 parent 3c80c9c commit 3322e25

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

flake.nix

+22-1
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,31 @@
105105
[
106106
config
107107
{
108+
imports = [
109+
(nixpkgs + "/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix")
110+
(nixpkgs + "/nixos/modules/virtualisation/qemu-vm.nix")
111+
];
112+
113+
virtualisation = {
114+
memorySize = 4096;
115+
116+
qemu.options = [
117+
"-cpu host"
118+
"-enable-kvm"
119+
];
120+
121+
forwardPorts = [
122+
{
123+
from = "host";
124+
host.port = 2222;
125+
guest.port = 22;
126+
}
127+
];
128+
};
129+
108130
nixpkgs.hostPlatform = "x86_64-linux";
109131
system.stateVersion = "23.05";
110132
}
111-
(nixpkgs + "/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix")
112133
]
113134
# TODO: this needs to take a different shape,
114135
# otherwise the transformation to obtain it is confusing

0 commit comments

Comments
 (0)