Move V-Rising Docker server into game-servers.nix
Consolidates V-Rising into the existing game-servers module instead of a separate file. Also uncomments the game-servers import in common.nix and adds UDP 9876/9877 to the shared firewall rules. https://claude.ai/code/session_01Ays1x4CUUJE1jPLkeNMojV
This commit is contained in:
parent
f556d887c3
commit
a35281419f
3 changed files with 35 additions and 47 deletions
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
# Services #
|
||||
./services/server-permissions.nix
|
||||
#./services/game-servers.nix
|
||||
./services/game-servers.nix
|
||||
./services/qbittorrent-nox.nix
|
||||
./services/nginx.nix
|
||||
./services/go2rtc.nix
|
||||
|
|
@ -32,7 +32,6 @@
|
|||
./services/authelia.nix
|
||||
./services/homepage.nix
|
||||
./services/arr-interconnect.nix
|
||||
./services/v-rising.nix
|
||||
];
|
||||
|
||||
### Make build time quicker
|
||||
|
|
|
|||
|
|
@ -1,6 +1,39 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
{
|
||||
config = lib.mkIf (config.networking.hostName == "FredOS-Mediaserver") {
|
||||
## <----- V-RISING ----> ##
|
||||
virtualisation.docker.enable = true;
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
"d /var/lib/v-rising 0755 root root -"
|
||||
"d /var/lib/v-rising/server 0755 root root -"
|
||||
"d /var/lib/v-rising/persistentdata 0755 root root -"
|
||||
];
|
||||
|
||||
virtualisation.oci-containers = {
|
||||
backend = "docker";
|
||||
containers.v-rising = {
|
||||
image = "trueosiris/vrising:latest";
|
||||
|
||||
volumes = [
|
||||
"/var/lib/v-rising/server:/mnt/vrising/server"
|
||||
"/var/lib/v-rising/persistentdata:/mnt/vrising/persistentdata"
|
||||
];
|
||||
|
||||
ports = [
|
||||
"9876:9876/udp"
|
||||
"9877:9877/udp"
|
||||
];
|
||||
|
||||
environment = {
|
||||
TZ = "Europe/Stockholm";
|
||||
SERVERNAME = "FredOS V-Rising";
|
||||
WORLDNAME = "world1";
|
||||
# SERVERPASSWORD = "";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
## <----- HYTALE ----> ##
|
||||
systemd.services.hytale-server = {
|
||||
description = "Hytale Dedicated Server";
|
||||
|
|
@ -31,6 +64,6 @@
|
|||
};
|
||||
};
|
||||
|
||||
networking.firewall.allowedUDPPorts = [ 5520 ];
|
||||
networking.firewall.allowedUDPPorts = [ 5520 9876 9877 ];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,44 +0,0 @@
|
|||
# services/v-rising.nix — V-Rising dedicated server via Docker
|
||||
{ config, lib, ... }:
|
||||
{
|
||||
config = lib.mkIf (config.networking.hostName == "FredOS-Mediaserver") {
|
||||
|
||||
# Docker backend for OCI containers
|
||||
virtualisation.docker.enable = true;
|
||||
|
||||
# Persistent data directories
|
||||
systemd.tmpfiles.rules = [
|
||||
"d /var/lib/v-rising 0755 root root -"
|
||||
"d /var/lib/v-rising/server 0755 root root -"
|
||||
"d /var/lib/v-rising/persistentdata 0755 root root -"
|
||||
];
|
||||
|
||||
virtualisation.oci-containers = {
|
||||
backend = "docker";
|
||||
containers.v-rising = {
|
||||
image = "trueosiris/vrising:latest";
|
||||
|
||||
volumes = [
|
||||
"/var/lib/v-rising/server:/mnt/vrising/server"
|
||||
"/var/lib/v-rising/persistentdata:/mnt/vrising/persistentdata"
|
||||
];
|
||||
|
||||
ports = [
|
||||
"9876:9876/udp"
|
||||
"9877:9877/udp"
|
||||
];
|
||||
|
||||
environment = {
|
||||
TZ = "Europe/Stockholm";
|
||||
SERVERNAME = "FredOS V-Rising";
|
||||
WORLDNAME = "world1";
|
||||
# Set SERVERPASSWORD via a secrets file or leave empty for public server
|
||||
# SERVERPASSWORD = "";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Open firewall for V-Rising game traffic
|
||||
networking.firewall.allowedUDPPorts = [ 9876 9877 ];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue