nixos-config/config/host-config/toothless.nix
2024-02-10 16:53:55 -08:00

105 lines
2.6 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;
}];
};
firewall.enable = false;
};
security.sudo.extraConfig = ''
# Due to rollback, sudo will lecture after every reboot
Defaults lecture = never
'';
services = {
immichContainer = {
state-directory = "/state/immich/state";
store-directory = "/state/immich/store";
};
};
fudo = {
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;
# };
};
};
};
virtualisation = {
podman = {
enable = true;
autoPrune.enable = true;
dockerSocket.enable = true;
dockerCompat = true;
defaultNetwork.settings = {
dns_enabled = true;
network_dns_servers = [ "1.1.1.1" "8.8.4.4" ];
};
};
oci-containers.backend = "podman";
arion.backend = "podman-socket";
};
systemd.targets = {
sleep.enable = false;
suspend.enable = false;
hibernate.enable = false;
hybrid-sleep.enable = false;
};
};
}