morph-rc/configuration/lib/nginx.nix

18 lines
376 B
Nix
Raw Normal View History

2022-02-27 13:10:52 +01:00
hosts: { lib, ... }:
let
mapMkMerge = builtins.mapAttrs (_host: configs: lib.mkMerge configs);
in {
services.nginx = {
enable = true;
virtualHosts = {
"404.cryto.net" = {
# Pseudo-hostname just to set a default when no Host header is specified
default = true;
extraConfig = ''
return 404;
'';
};
} // mapMkMerge hosts;
};
}