Boot VM in text mode

pull/30/head
Tristan Daniël Maat 2021-04-25 02:29:01 +01:00
parent a3b72d11bd
commit 1d95c40075
Signed by: tlater
GPG Key ID: 49670FD774E43268
2 changed files with 8 additions and 1 deletions

View File

@ -14,6 +14,8 @@ nixos-rebuild build-vm --flake '.#vm'
### Running
*Note: M-2 will bring up a console for poweroff and such*
Running should *mostly* be as simple as running the command the build
script echos.

View File

@ -65,6 +65,11 @@
(import ./configuration)
({ ... }: {
users.users.tlater.password = "insecure";
# Disable graphical tty so -curses works
boot.kernelParams = [ "nomodeset" ];
# # Set up VM settings to match real VPS
# virtualisation.memorySize = 3941;
# virtualisation.cores = 2;
})
@ -76,7 +81,7 @@
mkShell {
buildInputs = [ nixfmt git-lfs ];
shellHook = ''
export QEMU_OPTS="-m 3941 -smp 2"
export QEMU_OPTS="-m 3941 -smp 2 -curses"
export QEMU_NET_OPTS="hostfwd=::3022-:2222,hostfwd=::3080-:80,hostfwd=::3443-:443,hostfwd=::3021-:2221,hostfwd=::25565-:25565"
'';
};