diff --git a/modules/nixos/selfhosted/send.nix b/modules/nixos/selfhosted/send.nix new file mode 100644 index 0000000..093a993 --- /dev/null +++ b/modules/nixos/selfhosted/send.nix @@ -0,0 +1,33 @@ +{ + lib, + config, + ... +}: { + services = { + send = { + enable = true; + port = 1443; + + environment = { + DEFAULT_DOWNLOADS = 5; + DETECT_BASE_URL = true; + }; + }; + + nginx = { + enable = lib.mkForce true; + virtualHosts = { + "share.tux.rs" = { + forceSSL = true; + useACMEHost = "tux.rs"; + locations = { + "/" = { + proxyPass = "http://${config.services.send.host}:${toString config.services.send.port}"; + proxyWebsockets = true; + }; + }; + }; + }; + }; + }; +}