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 = {
|
2022-11-26 15:48:30 +00:00
|
|
|
image = "lloesche/valheim-server@sha256:e7c2c26620d4005ff506cdce1eeafc795496c02d0eba01c62f8965ac233092c7";
|
2022-08-01 22:55:59 +01:00
|
|
|
|
|
|
|
environment = {
|
|
|
|
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" = {};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|