{ config, lib, pkgs, ... }: let shinobi-port = "7080"; shinobi-od-port = "7082"; in { # TODO: remove? nixpkgs.config.permittedInsecurePackages = [ "openssh-with-gssapi-8.4p1" # CVE-2021-28041 ]; fudo.slynk.enable = true; networking = { interfaces = { enp3s0f0.useDHCP = false; enp3s0f1.useDHCP = false; enp4s0f0.useDHCP = false; enp4s0f1.useDHCP = false; intif0 = { useDHCP = true; }; }; }; fudo.ipfs = { enable = true; users = [ "niten" ]; api-address = "/ip4/0.0.0.0/tcp/5001"; }; virtualisation = { docker = { enable = true; enableOnBoot = true; autoPrune = { enable = true; }; }; oci-containers = { containers = { shinobi = { image = "shinobisystems/shinobi:latest"; ports = [ "${shinobi-port}:8080" ]; volumes = [ "/srv/shinobi/plugins:/home/Shinobi/plugins" "/srv/shinobi/config:/home/Shinobi/config" "/srv/shinobi/videos:/home/Shinobi/videos" "/srv/shinobi/db-data:/var/lib/mysql" "/etc/localtime:/etc/localtime:ro" ]; }; # shinobi-od = { # image = "shinobisystems/shinobi-tensorflow:latest"; # volumes = # [ "/srv/shinobi/od-config:/home/Shinobi/docker-plugins/tensorflow" ]; # ports = [ "${shinobi-od-port}:8082" ]; # environment = { # PLUGIN_HOST = "panopticon.sea.fudo.org"; # PLUGIN_PORT = shinobi-port; # PLUGIN_KEY = "30sWllylOxsDcE4vQXEPaXNfe5DiB3"; # }; # }; # photoprism = { image = "photoprism/photoprism"; }; }; }; }; services.nginx = { enable = true; recommendedGzipSettings = true; recommendedOptimisation = true; recommendedProxySettings = true; virtualHosts = { "panopticon.sea.fudo.org" = { locations."/" = { proxyPass = "http://localhost:${shinobi-port}"; extraConfig = '' proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; ''; }; }; # "panopticon-od.sea.fudo.org" = { # locations."/" = { # proxyPass = "http://localhost:${shinobi-od-port}"; # extraConfig = '' # proxy_http_version 1.1; # proxy_set_header Upgrade $http_upgrade; # proxy_set_header Connection "Upgrade"; # ''; # }; # }; }; }; }