You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
453 B
Nix
23 lines
453 B
Nix
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;
|
|
};
|
|
|
|
networking.firewall.allowedTCPPorts = [
|
|
80 # HTTP
|
|
443 # HTTPS
|
|
];
|
|
}
|