nixos-config/config/host-config/toothless.nix

96 lines
2.5 KiB
Nix

{ config, lib, pkgs, ... }:
let
stateDir = "/state";
primaryIp = "10.0.0.12";
generateMac = pkgs.lib.network.generate-mac-address;
in {
imports = [ ./toothless/factorio.nix ];
config = {
networking = {
useDHCP = false;
defaultGateway = {
address = "10.0.0.1";
interface = "intif0";
};
interfaces.intif0 = {
ipv4.addresses = [{
address = primaryIp;
prefixLength = 16;
}];
};
};
security.sudo.extraConfig = ''
# Due to rollback, sudo will lecture after every reboot
Defaults lecture = never
'';
fudo = {
# minecraft-server = {
# enable = true;
# data-dir = "/state/services/minecraft";
# world-name = "TLS";
# motd = "Welcome to Jasper's TLS minecraft server.";
# game-mode = "survival";
# difficulty = 1;
# allow-cheats = true;
# allocated-memory = 16;
# port = 25555;
# query-port = 25556;
# rcon-port = 25557;
# world-seed = 2090763904884813452;
# };
minecraft-clj = {
enable = true;
state-directory = "/state/services/minecraft-clj";
admins = [ "fudoniten" ];
worlds = {
REPLand = {
allocated-memory = 8;
port = 25565;
query-port = 25566;
rcon-port = 25567;
};
tls = {
world-name = "TLS";
motd = "Welcome to Jasper's TLS minecraft world";
world-seed = 1613434103;
port = 25555;
query-port = 25556;
rcon-port = 25557;
game-mode = "survival";
difficulty = "easy";
allow-cheats = true;
pvp = false;
allocated-memory = 16;
package = pkgs.papermc-current;
};
# wof = {
# world-name = "WorldOfFun";
# # world-seed = 2059666523504992;
# world-seed = 2090763904884813452;
# port = 25568;
# query-port = 25569;
# rcon-port = 25570;
# difficulty = "medium";
# game-mode = "survival";
# motd = "Welcome to the World of Fun!";
# allow-cheats = true;
# allocated-memory = 16;
# pvp = false;
# };
};
};
};
systemd.targets = {
sleep.enable = false;
suspend.enable = false;
hibernate.enable = false;
hybrid-sleep.enable = false;
};
};
}