added containers
This commit is contained in:
parent
49e6959ac2
commit
473d14d921
2 changed files with 58 additions and 0 deletions
5
modules/containers/default.nix
Normal file
5
modules/containers/default.nix
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [ ./media.nix ];
|
||||||
|
}
|
53
modules/containers/media.nix
Normal file
53
modules/containers/media.nix
Normal file
|
@ -0,0 +1,53 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
containers.radarr = {
|
||||||
|
config = { config, pkgs, ... }: { services.radarr.enable = true; };
|
||||||
|
bindMounts = {
|
||||||
|
"/dowloads" = {
|
||||||
|
hostPath = "/var/lib/Transmission/Downloads/completed/";
|
||||||
|
isReadOnly = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
containers.sonarr = {
|
||||||
|
config = { config, pkgs, ... }: { services.sonarr.enable = true; };
|
||||||
|
bindMounts = {
|
||||||
|
"/dowloads" = {
|
||||||
|
hostPath = "/var/lib/Transmission/Downloads/completed/";
|
||||||
|
isReadOnly = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
containers.jackett = {
|
||||||
|
config = { config, pkgs, ... }: { services.jackett.enable = true; };
|
||||||
|
};
|
||||||
|
containers.transmission = {
|
||||||
|
config = { config, pkgs, ... }: {
|
||||||
|
# services.openvpn = { servers = { nordvpn = { }; }; };
|
||||||
|
networking.firewall = {
|
||||||
|
enable = true;
|
||||||
|
# extraStopCommands = ''
|
||||||
|
# sudo iptables -N ALLOWVPN
|
||||||
|
# sudo iptables -N BLOCKALL
|
||||||
|
|
||||||
|
# # allow access for the interfaces loopback, tun, and tap
|
||||||
|
# sudo iptables -A OUTPUT -o tun+ -j ACCEPT;
|
||||||
|
# sudo iptables -A OUTPUT -o tap+ -j ACCEPT;
|
||||||
|
# sudo iptables -A OUTPUT -o lo+ -j ACCEPT;
|
||||||
|
|
||||||
|
# # route outgoing data via our created chains
|
||||||
|
# sudo iptables -A OUTPUT -j ALLOWVPN;
|
||||||
|
# sudo iptables -A OUTPUT -j BLOCKALL;
|
||||||
|
|
||||||
|
# # block all disallowed connections
|
||||||
|
# sudo iptables -A BLOCKALL -j DROP
|
||||||
|
# '';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
bindMounts = {
|
||||||
|
"/var/lib/transmission" = { hostPath = "/home/moritz/Transmission/"; };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in a new issue