mail2-nixos-config/hopglass-frontend.nix

28 lines
680 B
Nix
Raw Permalink Normal View History

{ config, lib, pkgs, ... }:
let
hopglass-fe = (pkgs.callPackage ./pkg-hopglass-fe.nix {
conf = ./hopglass-frontend.config.json;
} );
in
{
2019-08-16 21:02:34 +02:00
services.nginx.virtualHosts."map.hamburg.freifunk.net" = {
forceSSL = true;
enableACME = true;
default = true;
root = "${hopglass-fe}";
extraConfig = ''
access_log off;
2021-05-01 18:42:06 +02:00
add_header Permissions-Policy "interest-cohort=()" always;
'';
locations."/" = {
extraConfig = ''
index index.html;
etag off;
add_header etag "\"${builtins.substring 11 32 hopglass-fe}\"";
2021-05-01 18:42:06 +02:00
add_header Permissions-Policy "interest-cohort=()" always;
'';
};
};
}