Add starbound server

This commit is contained in:
Tristan Daniël Maat 2022-04-23 04:08:45 +01:00
parent e7102adec1
commit cd92ec64c2
Signed by: tlater
GPG key ID: 49670FD774E43268
8 changed files with 253 additions and 6 deletions

View file

@ -130,9 +130,26 @@
])
]))
];
shellHook = ''
shellHook = let
inherit (pkgs.lib.attrsets) mapAttrsToList;
inherit (pkgs.lib.strings) concatStringsSep;
ports = {
"3022" = "2222";
"3080" = "80";
"3443" = "443";
"3021" = "2221";
"25565" = "25565";
"21025" = "21025"; # Starbound
};
QEMU_NET_OPTS =
concatStringsSep ","
(mapAttrsToList
(host: vm: "hostfwd=::${host}-:${vm}")
ports);
in
''
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="${QEMU_NET_OPTS}"
# Work around sudo requiring a full terminal
export NIX_SSHOPTS="-t"