{ self, hostPath, tree, inputs, config, pkgs, ... }: let containerAddresses = import "${hostPath}/data/containerAddresses.nix"; hostIP = containerAddresses.host; containerIP = containerAddresses.containers.social-02; in { containers.social-02 = { autoStart = true; privateNetwork = true; hostAddress = hostIP; localAddress = containerIP; specialArgs = { inherit inputs; inherit tree; inherit self; inherit hostPath; }; config = {...}: { nixpkgs.pkgs = pkgs; imports = with tree; [ presets.nixos.containerBase ./secrets.nix ] ++ (with hosts.hetzner-arm.containers.social-02.profiles; [ gotosocial #restic ]); networking.firewall = { enable = true; allowedTCPPorts = [8080]; }; home-manager.users.root.home.stateVersion = "23.05"; system.stateVersion = "23.05"; }; }; services.nginx.virtualHosts."gts-02.owo.monster" = { forceSSL = true; enableACME = true; locations."/" = { proxyPass = "http://${containerIP}:8080"; proxyWebsockets = true; extraConfig = '' # uncomment if running nginx without recommendedProxySettings # proxy_set_header Host $host; # proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; # proxy_set_header X-Forwarded-Proto $scheme; ''; }; extraConfig = '' client_max_body_size 128M; ''; }; }