b9b41ff update depencies because of RUSTSEC-2024-0019
~raphi pushed to ~raphi/nix-index-web git
Web interface to nix-index.
nix-index-web <address> <databases_dir>
You should place this service behind a reverse proxy, e.g. nginx (otherwise static files won't be served).
You can use the supplied nixos module (available as the flake attribute "nixosModules.default").
services.nix-index-web = {
enable = true;
listenAddress = "[::1]:1234";
refreshInterval = "Mon *-*-* 10:10:00";
};
services.nginx.virtualHosts.WHATEVER.locations = {
"/nix-index".return = "301 $scheme://$host$request_uri/";
"/nix-index/" = {
proxyPass = "http://[::1]:1234/";
extraConfig = ''
add_header x-content-type-options nosniff;
add_header content-security-policy "default-src 'self'; object-src 'none'; frame-ancestors 'none'";
# Optional but recommended:
proxy_cache default;
proxy_cache_valid 200 120m;
'';
};
"/nix-index/_/" = {
alias = "${pkgs.nix-index-web.wwwroot}/_/";
extraConfig = ''
add_header x-content-type-options nosniff;
add_header content-security-policy "default-src 'self'; object-src 'none'; frame-ancestors 'none'";
'';
};
};