Add V-Rising dedicated server via Docker on FredOS-Mediaserver
Uses NixOS virtualisation.oci-containers (Docker backend) with the trueosiris/vrising image. Persists server files and save data under /var/lib/v-rising/. Opens UDP 9876/9877 in the firewall. https://claude.ai/code/session_01Ays1x4CUUJE1jPLkeNMojV
This commit is contained in:
parent
556d93a81f
commit
f556d887c3
2 changed files with 45 additions and 0 deletions
|
|
@ -32,6 +32,7 @@
|
|||
./services/authelia.nix
|
||||
./services/homepage.nix
|
||||
./services/arr-interconnect.nix
|
||||
./services/v-rising.nix
|
||||
];
|
||||
|
||||
### Make build time quicker
|
||||
|
|
|
|||
44
services/v-rising.nix
Normal file
44
services/v-rising.nix
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
# 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