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