Repository navigation
Expand file tree
/
Copy pathdocker.nix
More file actions
45 lines (43 loc) · 1.65 KB
/
Copy pathdocker.nix
File metadata and controls
45 lines (43 loc) · 1.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
{ config, pkgs, ... }:
{
age.secrets.docker = {
file = ./secrets/docker.age;
owner = "docker";
};
virtualisation.docker.enable = true;
virtualisation.oci-containers = {
backend = "docker";
containers = {
flaresolverr = {
image = "21hsmw/flaresolverr:nodrivertest";
autoStart = true;
environment = {
"TZ" = "Europe/Paris";
"DRIVER" = "nodriver";
"PGID" = "1001";
"PUID" = "1054";
};
ports = [ "8191:8191" ];
};
mc = {
image = "itzg/minecraft-server:latest";
autoStart = true;
ports = [ "25565:25565" ];
environmentFiles = [ config.age.secrets.docker.path ];
environment = {
"EULA" = "TRUE";
"TYPE" = "AUTO_CURSEFORGE";
"CF_PAGE_URL" = "https://www.curseforge.com/minecraft/modpacks/all-the-mods-10";
"JVM_XX_OPTS" =
"-XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=32M -XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1";
"JVM_OPTS" = "-Xms4G -Xmx8G";
"JVM_DD_OPTS" = "using.aikars.flags=https://mcflags.emc.gs,aikars.new.flags=true";
};
volumes = [
"/var/lib/mc:/data"
"/mnt/disk/mc-backup:/back/simplebackups"
];
};
};
};
}