40 lines
1.1 KiB
Nix
40 lines
1.1 KiB
Nix
{ config, lib, pkgs, ... }:
|
|
{
|
|
|
|
virtualisation.oci-containers = {
|
|
containers.unmanic = {
|
|
volumes = [
|
|
"/media/arr/unmanic/config:/config"
|
|
#"/media/arr/unmanic/library:/library"
|
|
"/media/arr/unmanic/tmp:/tmp/unmanic"
|
|
"/media:/library"
|
|
];
|
|
environment = {
|
|
PUID = toString config.users.users.media.uid;
|
|
PGID = toString config.users.groups.media.gid;
|
|
};
|
|
ports = [
|
|
"127.0.0.1:8889:8888"
|
|
];
|
|
image = "josh5/unmanic:latest";
|
|
};
|
|
};
|
|
|
|
#networking.firewall.interfaces.wg0.allowedTCPPorts = [ 8266 ];
|
|
#networking.firewall.interfaces.wg0.allowedUDPPorts = [ 8266 ];
|
|
|
|
#networking.firewall.interfaces.enp0s31f6.allowedTCPPorts = [ 8266 ];
|
|
#networking.firewall.interfaces.enp0s31f6.allowedUDPPorts = [ 8266 ];
|
|
|
|
services.nginx.virtualHosts."unmanic.${config.networking.hostName}.private" = {
|
|
extraConfig = ''
|
|
allow ${config.tinc.private.subnet};
|
|
deny all;
|
|
'';
|
|
locations."/" = {
|
|
proxyPass = "http://localhost:8889";
|
|
proxyWebsockets = true;
|
|
};
|
|
};
|
|
|
|
}
|