snix/users/sterni/machines/ingeborg/http/sterni.lv.nix
sterni 1fcd827230 feat(sterni/machines/ingeborg): disallow crawling of /tmp
Change-Id: Ic104ff7837c5f728b4e9b33b2ed2ed1ceba8103e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/13054
Autosubmit: sterni <sternenseemann@systemli.org>
Reviewed-by: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
2025-01-24 21:26:31 +00:00

39 lines
833 B
Nix

{ pkgs, depot, ... }:
let
inherit (depot.users.sterni.nix.html)
__findFile
;
in
{
imports = [
./nginx.nix
];
config = {
services.nginx.virtualHosts."sterni.lv" = {
enableACME = true;
forceSSL = true;
root = pkgs.writeTextFile {
name = "sterni.lv-http-root";
destination = "/index.html";
text = <html> { } [
(<head> { } [
(<meta> { charset = "utf-8"; } null)
(<title> { } "no thoughts")
])
(<body> { } "🦩")
];
};
# TODO(sterni): tmp.sterni.lv
locations."/tmp/".root = toString /srv/http;
extraConfig = ''
location = /robots.txt {
add_header Content-Type text/plain;
return 200 "User-agent: *\nDisallow: /tmp\n";
}
'';
};
};
}