nixos/roles/server/ivabus-dev.nix
Ivan Bushchik 89c283ee99
Enable http/3 on all websites
Signed-off-by: Ivan Bushchik <ivabus@ivabus.dev>
2023-12-10 09:36:24 +03:00

23 lines
583 B
Nix

{ config, lib, pkgs, ... }:
let cfg = config.my.roles.server.ivabus-dev;
in {
options.my.roles.server.ivabus-dev.enable =
lib.mkEnableOption "Serve ivabus.dev";
config = lib.mkIf (cfg.enable) {
my.roles.server.nginx.enable = true;
services.nginx = {
virtualHosts."ivabus.dev" = {
forceSSL = true;
enableACME = true;
http3 = true;
root = pkgs.callPackage ../../pkgs/ivabus-dev.nix { };
extraConfig = ''
error_page 404 /404.html;
'';
serverAliases = [ "www.ivabus.dev" ];
};
};
};
}