diff --git a/system/nixinator/default.nix b/system/nixinator/default.nix index f25e4b3a..ad66bfee 100644 --- a/system/nixinator/default.nix +++ b/system/nixinator/default.nix @@ -12,6 +12,9 @@ ./disks.nix ../modules + + # General services + ../services/fileflows-node.nix ]; modules = { diff --git a/system/servenix/default.nix b/system/servenix/default.nix index 5eec5426..63442274 100644 --- a/system/servenix/default.nix +++ b/system/servenix/default.nix @@ -61,6 +61,8 @@ }; }; + # NOTE: Streams: Ports have to be opened in the VPS firewall + VPS UFW and bound in the VPS Nginx compose file. + allowedTCPPorts = [ 53 # DNS (Adguard Home) 67 # DHCP diff --git a/system/services/fileflows-node.nix b/system/services/fileflows-node.nix new file mode 100644 index 00000000..4d65f19d --- /dev/null +++ b/system/services/fileflows-node.nix @@ -0,0 +1,54 @@ +{ + config, + lib, + pkgs, + ... +}: let + fileflowsVersion = "25.10"; +in { + virtualisation.oci-containers.containers = { + fileflows-node = { + image = "revenz/fileflows:${fileflowsVersion}"; + autoStart = true; + + login = { + # Uses DockerHub by default + # registry = ""; + + # DockerHub Credentials + username = "christoph.urlacher@protonmail.com"; + passwordFile = "${config.sops.secrets.docker-password.path}"; + }; + + dependsOn = []; + + ports = []; + + volumes = [ + "/home/christoph/Movies:/media/movies" + "/home/christoph/Shows:/media/tvshows" + + "fileflows_temp:/temp" + + "/var/run/docker.sock:/var/run/docker.socl:ro" + ]; + + hostname = "Nixinator"; + + environment = { + PUID = "3000"; + PGID = "3000"; + TZ = "Europe/Berlin"; + + FFNODE = "1"; + ServerUrl = "https://fileflows.local.chriphost.de"; + }; + + extraOptions = [ + "--privileged" + "--device=nvidia.com/gpu=all" + # "--net=behind-nginx" + ]; + }; + }; +}