feat: puffer http server

This commit is contained in:
alina 🌸 2024-08-29 16:04:06 +03:00
parent 193d89b337
commit 9fe5fb80a6
Signed by: teidesu
SSH key fingerprint: SHA256:uNeCpw6aTSU4aIObXLvHfLkDa82HWH9EiOj9AXOIRpI
2 changed files with 27 additions and 0 deletions

View file

@ -180,5 +180,31 @@ in
(secrets.declare [ "sftpgo-ed25519" ]) (secrets.declare [ "sftpgo-ed25519" ])
container container
]; ];
services.nginx.virtualHosts."puffer.stupid.fish" = {
forceSSL = true;
useACMEHost = "stupid.fish";
locations."/public/" = {
extraConfig = ''
alias /mnt/puffer/Public/;
autoindex on;
'';
};
locations."/downloads/" = {
extraConfig = ''
alias /mnt/puffer/Downloads/;
autoindex on;
'';
};
locations."= /" = {
extraConfig = ''
add_header 'Content-Type' 'text/html; charset=utf-8';
return 200 '<html><body><h1>🐡 puffer</h1><a href="/public/">public</a><br><a href="/downloads/">downloads</a></body></html>';
'';
};
};
} }

View file

@ -11,6 +11,7 @@ let
10.42.0.2 very.stupid.fish 10.42.0.2 very.stupid.fish
10.42.0.5 puffer.stupid.fish 10.42.0.5 puffer.stupid.fish
10.42.0.8 bnuuy.stupid.fish 10.42.0.8 bnuuy.stupid.fish
10.42.0.2 puffer.stupid.fish
''; '';
package = coredns.override { package = coredns.override {