{ pkgs, config, lib, ... }: { options.website.defaultHeaders = lib.mkOption { type = lib.types.str; default = '' header { -Server -Date -Last-Modified -Etag -Accept-Ranges # disable indexing by search engines X-Robots-Tag "noindex, nofollow" # disable FLoC tracking # Permissions-Policy interest-cohort=() # enable HSTS # Strict-Transport-Security max-age=31536000; # disable clients from sniffing the media type # X-Content-Type-Options nosniff # clickjacking protection # X-Frame-Options DENY # keep referrer data off of HTTP connections # Referrer-Policy no-referrer-when-downgrade } ''; }; config = { services.caddy = { enable = true; virtualHosts = { "tzlil.net".extraConfig = '' bind 0.0.0.0 handle_path / { try_files ${pkgs.writeText "index.html" ''
            fm.tzlil.net music
            git.tzlil.net for everything im too embarrased to put on sourcehut
            
''} / file_server } ''; }; }; networking.firewall.allowedTCPPorts = [80 443]; environment.persistence."/nix/persist".directories = [ { directory = "/var/lib/caddy"; user = "caddy"; group = "caddy"; } ]; }; }