mirror of
https://github.com/tuxdotrs/nixos-config.git
synced 2025-07-06 17:56:35 +05:30
feat: add send
This commit is contained in:
33
modules/nixos/selfhosted/send.nix
Normal file
33
modules/nixos/selfhosted/send.nix
Normal file
@ -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;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Reference in New Issue
Block a user