Skip to content

Commit

Permalink
feat: asa set permission
Browse files Browse the repository at this point in the history
  • Loading branch information
xgroleau committed Jul 6, 2024
1 parent 0e3896d commit a615d90
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions modules/ark-survival-ascended/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -42,25 +42,40 @@ in
virtualisation.oci-containers.containers = {
asa-1 = {
autoStart = true;
image = "mschnitzer/asa-linux-server:latest";
image = "mschnitzer/asa-linux-server:latest";
entrypoint - "/usr/bin/start_server";
user = "gameserver";
volumes = [
"/etc/localtime:/etc/localtime:ro"
"asa-steam:/home/gameserver/Steam:rw"
"asa-steamcmd:/home/gameserver/steamcmd:rw"
"${cfg.serverDataDir}:/home/gameserver/server-files:rw"
"${cfg.clusterDataDir}:/home/gameserver/cluster-shared:rw"
];
dependsOn: ["asa-1-set-permissions"];

environment = {
PUID = "1000";
PGID = "1000";
PUID = "25000";
PGID = "25000";

ASA_START_PARAMS = "TheCenter_WP?listen?Port=7777?RCONPort=27020?RCONEnabled=True -WinLiveMaxPlayers=50 -clusterid=default -ClusterDirOverride=\"/home/gameserver/cluster-shared\"";
ENABLE_DEBUG = "0";
};

ports = [ "${toString cfg.port}:7777/udp" ];
};

asa-1-set-permissions = {
entrypoint = "/bin/bash -c 'chown -R 25000:25000 /steam ; chown -R 25000:25000 /steamcmd ; chown -R 25000:25000 /server-files ; chown -R 25000:25000 /cluster-shared'";
user = "root";
image = "opensuse/leap";
volumes = [
"steam-1:/steam:rw"
"steamcmd-1:/steamcmd:rw"
"${cfg.serverDataDir}:/server-files:rw"
"${cfg.clusterDataDir}:/cluster-shared:rw"
];
};
};

networking.firewall = {
Expand Down

0 comments on commit a615d90

Please sign in to comment.