nixos/roles/server/slides-ivabus-dev.nix
Ivan Bushchik 0375a858ec
Host slides.ivabus.dev using Nix
Signed-off-by: Ivan Bushchik <ivabus@ivabus.dev>
2023-12-20 06:48:33 +03:00

23 lines
572 B
Nix

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