Add minecraft service #30

Manually merged
tlater merged 6 commits from tlater/add-minecraft into master 2021-04-25 06:25:05 +01:00
2 changed files with 8 additions and 1 deletions
Showing only changes of commit 1d95c40075 - Show all commits

View file

@ -14,6 +14,8 @@ nixos-rebuild build-vm --flake '.#vm'
### Running ### 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 Running should *mostly* be as simple as running the command the build
script echos. script echos.

View file

@ -65,6 +65,11 @@
(import ./configuration) (import ./configuration)
({ ... }: { ({ ... }: {
users.users.tlater.password = "insecure"; 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.memorySize = 3941;
# virtualisation.cores = 2; # virtualisation.cores = 2;
}) })
@ -76,7 +81,7 @@
mkShell { mkShell {
buildInputs = [ nixfmt git-lfs ]; buildInputs = [ nixfmt git-lfs ];
shellHook = '' 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" export QEMU_NET_OPTS="hostfwd=::3022-:2222,hostfwd=::3080-:80,hostfwd=::3443-:443,hostfwd=::3021-:2221,hostfwd=::25565-:25565"
''; '';
}; };