-
Notifications
You must be signed in to change notification settings - Fork 1
/
containers.nix
145 lines (131 loc) · 3.79 KB
/
containers.nix
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
{ ... }:
{
virtualisation.oci-containers = {
backend = "docker";
containers = {
watchtower = {
autoStart = true;
image = "containrrr/watchtower:latest";
volumes = [ "/var/run/docker.sock:/var/run/docker.sock" ];
extraOptions = [ "--network=internal-network" ];
};
envoy = {
autoStart = true;
image = "envoyproxy/envoy:v1.27-latest";
cmd = [
"--config-path /etc/envoy/envoy.yaml"
"--drain-time-s 30"
"--drain-strategy immediate"
"--cpuset-threads"
"--disable-hot-restart"
];
volumes = [
"/persist/envoy/envoy.yaml:/etc/envoy/envoy.yaml"
"/persist/certbot-cloudflare/letsencrypt:/etc/letsencrypt"
];
environment = {
"ENVOY_UID" = "0";
"ENVOY_GID" = "0";
};
ports = [ "80:80" "443:443" "9901:9901" "443:443/udp" ];
extraOptions = [ "--network=internal-network" ];
};
code-server = {
dependsOn = [ "envoy" ];
autoStart = true;
image = "lscr.io/linuxserver/code-server:latest";
volumes = [
"/persist/code-server:/config"
"/persist:/persist"
"/home/adi:/home/adi"
"/etc/nixos:/etc/nixos"
];
environment = {
PGID = "1000";
PUID = "1000";
};
extraOptions = [ "--network=internal-network" ];
};
homebridge = {
autoStart = true;
image = "oznu/homebridge:latest";
volumes = [ "/persist/homebridge:/homebridge" ];
environment = {
PGID = "1000";
PUID = "1000";
};
extraOptions = [ "--network=host" ];
};
wireguard = {
autoStart = true;
image = "linuxserver/wireguard:1.0.20210914";
volumes = [
"/persist/mullvad/wg0.conf:/config/wg0.conf"
"/lib/modules:/lib/modules"
];
environment = {
PGID = "1000";
PUID = "1000";
};
extraOptions = [
"--net=internal-network"
"--cap-add=NET_ADMIN"
"--sysctl=net.ipv4.conf.all.src_valid_mark=1"
"--sysctl=net.ipv6.conf.all.disable_ipv6=1"
];
};
transmission = {
dependsOn = [ "wireguard" ];
autoStart = true;
image = "linuxserver/transmission:latest";
volumes = [
"/persist/transmission:/config"
"/persist/downloads:/downloads"
"/persist/downloads/torrent-watch:/watch"
];
environment = {
PGID = "1000";
PUID = "1000";
TR_CURL_SSL_NO_VERIFY = "1";
};
extraOptions = [
"--net=container:wireguard"
"--sysctl=net.ipv6.conf.all.disable_ipv6=1"
];
};
plex = {
dependsOn = [ "envoy" ];
autoStart = true;
image = "lscr.io/linuxserver/plex:latest";
volumes = [
"/persist/plex:/config"
"/persist/downloads/tvshows:/data/tvshows"
"/persist/downloads/movies:/data/movies"
];
environment = {
PGID = "1000";
PUID = "1000";
VERSION = "docker";
};
extraOptions =
[ "--network=internal-network" "--device=/dev/dri:/dev/dri" ];
};
jellyfin = {
dependsOn = [ "envoy" ];
autoStart = true;
image = "lscr.io/linuxserver/jellyfin:latest";
volumes = [
"/persist/jellyfin:/config"
"/persist/downloads/tvshows:/data/tvshows"
"/persist/downloads/movies:/data/movies"
];
environment = {
PGID = "1000";
PUID = "1000";
};
extraOptions =
[ "--network=internal-network" "--device=/dev/dri:/dev/dri" ];
};
};
};
}