1 { config, lib, pkgs, ... }:
4 let cfg = config.awful.systems.maint-mode;
6 options.awful.systems.maint-mode = {
7 enable = mkEnableOption (mdDoc ''
8 Whether to configure nginx to display the maintenance mode route as default.
10 virtualHost = mkOption {
12 description = lib.mdDoc
13 "The nginx virtualHost to show the maintenance mode route for.";
17 config = mkIf cfg.enable {
20 virtualHosts."${cfg.virtualHost}" = {
21 root = mkForce (pkgs.callPackage ./site.nix { });
25 networking.firewall.allowedTCPPorts = [ 80 ];