update
This commit is contained in:
parent
2738484715
commit
591030445a
@ -19,6 +19,13 @@
|
|||||||
./services/minecraft.nix
|
./services/minecraft.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
systemd.targets = {
|
||||||
|
sleep.enable = false;
|
||||||
|
suspend.enable = false;
|
||||||
|
hibernate.enable = false;
|
||||||
|
hybrid-sleep.enable = false;
|
||||||
|
};
|
||||||
|
|
||||||
nix = {
|
nix = {
|
||||||
#garbage collection and cleanup stuff
|
#garbage collection and cleanup stuff
|
||||||
gc = {
|
gc = {
|
||||||
@ -113,6 +120,11 @@
|
|||||||
intel-gpu-tools
|
intel-gpu-tools
|
||||||
|
|
||||||
tmux
|
tmux
|
||||||
|
|
||||||
|
(pkgs.writeScriptBin "mc-attach" ''
|
||||||
|
#!/bin/sh
|
||||||
|
tmux -S /run/minecraft/${service_configs.minecraft.server_name}.sock attach
|
||||||
|
'')
|
||||||
];
|
];
|
||||||
|
|
||||||
services.zfs = {
|
services.zfs = {
|
||||||
|
|||||||
6
flake.lock
generated
6
flake.lock
generated
@ -43,11 +43,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1727574772,
|
"lastModified": 1727660955,
|
||||||
"narHash": "sha256-bPoftKOe6oWR2o5jgLQjmaBNH2ke7+ooDGxlXXIjsBc=",
|
"narHash": "sha256-993wM0FpCGf6V3MuHbooj7By3Jd6v/Skb7GYou9cNAI=",
|
||||||
"owner": "Infinidoge",
|
"owner": "Infinidoge",
|
||||||
"repo": "nix-minecraft",
|
"repo": "nix-minecraft",
|
||||||
"rev": "5ce4fc09d6fcf0b9d801ff3c98da83c56d85e045",
|
"rev": "e13f816e5bd0612b68568b04a66b1a5a36566549",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
23
flake.nix
23
flake.nix
@ -4,8 +4,10 @@
|
|||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
# nixpkgs.url = "github:NixOS/nixpkgs/master";
|
# nixpkgs.url = "github:NixOS/nixpkgs/master";
|
||||||
|
|
||||||
quadlet-nix.url = "github:SEIAROTg/quadlet-nix";
|
quadlet-nix.url = "github:SEIAROTg/quadlet-nix";
|
||||||
quadlet-nix.inputs.nixpkgs.follows = "nixpkgs";
|
quadlet-nix.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
nix-minecraft.url = "github:Infinidoge/nix-minecraft";
|
nix-minecraft.url = "github:Infinidoge/nix-minecraft";
|
||||||
nix-minecraft.inputs.nixpkgs.follows = "nixpkgs";
|
nix-minecraft.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
@ -24,6 +26,7 @@
|
|||||||
|
|
||||||
service_configs = {
|
service_configs = {
|
||||||
hdd_path = "/mnt/hdd";
|
hdd_path = "/mnt/hdd";
|
||||||
|
services_dir = "/tank/services";
|
||||||
|
|
||||||
# TODO: add checks to make sure none of these collide
|
# TODO: add checks to make sure none of these collide
|
||||||
ports = {
|
ports = {
|
||||||
@ -36,12 +39,12 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
https = {
|
https = {
|
||||||
certs = "/tank/services/http_certs";
|
certs = service_configs.services_dir + "/http_certs";
|
||||||
data_dir = "/tank/services/http";
|
data_dir = service_configs.services_dir + "/http";
|
||||||
};
|
};
|
||||||
|
|
||||||
gitea = {
|
gitea = {
|
||||||
dir = "/tank/services/gitea";
|
dir = service_configs.services_dir + "/gitea";
|
||||||
};
|
};
|
||||||
|
|
||||||
postgres = {
|
postgres = {
|
||||||
@ -49,26 +52,26 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
immich = {
|
immich = {
|
||||||
dir = "/tank/services/immich";
|
dir = service_configs.services_dir + "/immich";
|
||||||
};
|
};
|
||||||
|
|
||||||
minecraft = {
|
minecraft = {
|
||||||
parent_dir = "/tank/services/minecraft";
|
parent_dir = service_configs.services_dir + "/minecraft";
|
||||||
server_name = "main";
|
server_name = "main";
|
||||||
};
|
};
|
||||||
|
|
||||||
gluetun = {
|
gluetun = {
|
||||||
dir = "/tank/services/gluetun";
|
dir = service_configs.services_dir + "/gluetun";
|
||||||
};
|
};
|
||||||
|
|
||||||
torrent = {
|
torrent = {
|
||||||
config_dir = "/tank/services/qbittorrent/config";
|
config_dir = service_configs.services_dir + "/qbittorrent/config";
|
||||||
download_dir = "${service_configs.hdd_path}/torrents";
|
download_dir = service_configs.hdd_path + "/torrents";
|
||||||
};
|
};
|
||||||
|
|
||||||
jellyfin = {
|
jellyfin = {
|
||||||
data_dir = "/tank/services/jellyfin";
|
data_dir = service_configs.services_dir + "/jellyfin";
|
||||||
cache_dir = "/tank/services/jellyfin_cache";
|
cache_dir = service_configs.services_dir + "/jellyfin_cache";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
|
|||||||
@ -5,7 +5,6 @@
|
|||||||
service_configs,
|
service_configs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
boot.initrd.availableKernelModules = [
|
boot.initrd.availableKernelModules = [
|
||||||
"xhci_pci"
|
"xhci_pci"
|
||||||
|
|||||||
@ -12,6 +12,7 @@
|
|||||||
type = "postgres";
|
type = "postgres";
|
||||||
socket = service_configs.postgres.socket;
|
socket = service_configs.postgres.socket;
|
||||||
};
|
};
|
||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
server = {
|
server = {
|
||||||
DOMAIN = "git.gardling.com";
|
DOMAIN = "git.gardling.com";
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
heap_size = "6144M";
|
heap_size = "6144M";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
nixpkgs.config.allowUnfreePredicate =
|
nixpkgs.config.allowUnfreePredicate =
|
||||||
@ -14,16 +14,22 @@ in
|
|||||||
"minecraft-server"
|
"minecraft-server"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
users.groups.minecraft = {};
|
||||||
|
|
||||||
services.minecraft-servers = {
|
services.minecraft-servers = {
|
||||||
enable = true;
|
enable = true;
|
||||||
eula = true;
|
eula = true;
|
||||||
dataDir = service_configs.minecraft.parent_dir;
|
dataDir = service_configs.minecraft.parent_dir;
|
||||||
openFirewall = true;
|
openFirewall = true;
|
||||||
|
group = "users";
|
||||||
|
|
||||||
servers.${service_configs.minecraft.server_name} = {
|
servers.${service_configs.minecraft.server_name} = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.fabricServers.fabric-1_21_1;
|
package = pkgs.fabricServers.fabric-1_21_1;
|
||||||
|
|
||||||
# Aikar's flags
|
# Aikar's flags
|
||||||
jvmOpts = "-Xmx${heap_size} -Xms${heap_size} -XX:+AlwaysPreTouch -XX:+DisableExplicitGC -XX:+ParallelRefProcEnabled -XX:+PerfDisableSharedMem -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1HeapRegionSize=8M -XX:G1HeapWastePercent=5 -XX:G1MaxNewSizePercent=40 -XX:G1MixedGCCountTarget=4 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1NewSizePercent=30 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:G1ReservePercent=20 -XX:InitiatingHeapOccupancyPercent=15 -XX:MaxGCPauseMillis=200 -XX:MaxTenuringThreshold=1 -XX:SurvivorRatio=32";
|
jvmOpts = "-Xmx${heap_size} -Xms${heap_size} -XX:+AlwaysPreTouch -XX:+DisableExplicitGC -XX:+ParallelRefProcEnabled -XX:+PerfDisableSharedMem -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1HeapRegionSize=8M -XX:G1HeapWastePercent=5 -XX:G1MaxNewSizePercent=40 -XX:G1MixedGCCountTarget=4 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1NewSizePercent=30 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:G1ReservePercent=20 -XX:InitiatingHeapOccupancyPercent=15 -XX:MaxGCPauseMillis=200 -XX:MaxTenuringThreshold=1 -XX:SurvivorRatio=32";
|
||||||
|
|
||||||
serverProperties = {
|
serverProperties = {
|
||||||
server-port = service_configs.ports.minecraft;
|
server-port = service_configs.ports.minecraft;
|
||||||
enforce-whitelist = true;
|
enforce-whitelist = true;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user