2022-08-01 22:55:59 +01:00
|
|
|
{ lib, config, allAssignments, ... }:
|
|
|
|
let
|
2022-11-28 22:42:27 +00:00
|
|
|
inherit (lib) concatStringsSep;
|
2022-08-01 22:55:59 +01:00
|
|
|
inherit (lib.my) dockerNetAssignment;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
config = {
|
|
|
|
virtualisation.oci-containers.containers = {
|
|
|
|
valheim = {
|
2023-01-08 15:30:40 +00:00
|
|
|
image = "ghcr.io/lloesche/valheim-server@sha256:d977ccbeff02d2509646fb0157b5e353ebadb3105a3ed351b9c309a09a61701b";
|
2022-08-01 22:55:59 +01:00
|
|
|
|
|
|
|
environment = {
|
2023-01-08 15:30:40 +00:00
|
|
|
BACKUPS_IF_IDLE = "false";
|
2022-08-01 22:55:59 +01:00
|
|
|
SERVER_NAME = "amogus sus";
|
|
|
|
SERVER_PUBLIC = "true";
|
|
|
|
WORLD_NAME = "simpland2";
|
|
|
|
ADMINLIST_IDS = "76561198049818986";
|
2022-11-28 22:42:27 +00:00
|
|
|
PERMITTEDLIST_IDS = concatStringsSep " " [
|
|
|
|
"76561198049818986" # /dev/player0
|
|
|
|
"76561198044432445" # Nuda
|
|
|
|
"76561198121606266" # El Pugador
|
|
|
|
"76561198059894566" # hynge
|
|
|
|
];
|
2022-08-01 22:55:59 +01:00
|
|
|
TZ = "Europe/Dublin";
|
|
|
|
};
|
|
|
|
environmentFiles = [ config.age.secrets."whale2/valheim.env".path ];
|
|
|
|
|
|
|
|
volumes = [
|
2022-08-01 23:07:24 +01:00
|
|
|
"valheim_data:/config"
|
|
|
|
"valhem_server:/opt/valheim"
|
2022-08-01 22:55:59 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
extraOptions = [
|
|
|
|
''--network=colony:${dockerNetAssignment allAssignments "valheim-oci"}''
|
|
|
|
"--cap-add=SYS_NICE"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
my = {
|
|
|
|
secrets.files = {
|
|
|
|
"whale2/valheim.env" = {};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|