2023-09-06 11:20:33 +03:00
|
|
|
{ config, lib, pkgs, ... }:
|
2023-09-06 16:10:11 +03:00
|
|
|
let cfg = config.my.roles.server.ivabus-dev;
|
|
|
|
in {
|
|
|
|
options.my.roles.server.ivabus-dev.enable =
|
|
|
|
lib.mkEnableOption "Serve ivabus.dev";
|
2023-09-06 11:20:33 +03:00
|
|
|
config = lib.mkIf (cfg.enable) {
|
|
|
|
my.roles.server.nginx.enable = true;
|
|
|
|
services.nginx = {
|
|
|
|
virtualHosts."ivabus.dev" = {
|
2023-09-07 20:19:06 +03:00
|
|
|
forceSSL = true;
|
|
|
|
enableACME = true;
|
|
|
|
|
2023-09-06 16:10:11 +03:00
|
|
|
root = pkgs.callPackage ../../pkgs/ivabus-dev.nix { };
|
2023-09-06 11:20:33 +03:00
|
|
|
|
|
|
|
extraConfig = ''
|
|
|
|
error_page 404 /404.html;
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|