update hastebin
This commit is contained in:
6
flake.lock
generated
6
flake.lock
generated
@@ -284,11 +284,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1739189509,
|
||||
"narHash": "sha256-Lmf7rjFQCuugOVy2Rl7ROS5SggUJfasiUGpGIHqbLL4=",
|
||||
"lastModified": 1739261575,
|
||||
"narHash": "sha256-MRU+at2TEZ61G1bXJeVYIswJ8mVIaqVmXrKLBNs0lvU=",
|
||||
"owner": "~repomaa",
|
||||
"repo": "hastebin",
|
||||
"rev": "1b5ac48b94ffbdd9c960675cac867abc896c4c7f",
|
||||
"rev": "0400c9d3fcfe77dd4bd087c3f1f5ce06a8f29ad9",
|
||||
"type": "sourcehut"
|
||||
},
|
||||
"original": {
|
||||
|
||||
@@ -2,9 +2,6 @@
|
||||
let
|
||||
cfg = config.modules.services.bin;
|
||||
fqdn = "${cfg.subdomain}.${config.networking.domain}";
|
||||
KiB = 1024;
|
||||
MiB = 1024 * KiB;
|
||||
GiB = 1024 * MiB;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
@@ -28,7 +25,7 @@ in
|
||||
settings = {
|
||||
port = cfg.port;
|
||||
host = "::1";
|
||||
max_size = 1 * GiB;
|
||||
max_size = "1 GiB";
|
||||
mime_overrides = {
|
||||
"text/plain" = [
|
||||
"log"
|
||||
@@ -51,10 +48,12 @@ in
|
||||
|
||||
modules.services.webserver = {
|
||||
enable = lib.mkDefault true;
|
||||
vHosts.${fqdn}.locations."/" = {
|
||||
vHosts.${fqdn} = {
|
||||
proxyBuffering = false;
|
||||
locations."/" = {
|
||||
proxyPort = cfg.port;
|
||||
extraConfig = ''
|
||||
client_max_body_size ${toString (config.services.hastebin.settings.max_size / MiB)}m;
|
||||
client_max_body_size 0;
|
||||
proxy_send_timeout 300;
|
||||
proxy_read_timeout 300;
|
||||
send_timeout 300;
|
||||
@@ -62,4 +61,5 @@ in
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user