From 49f2a8b48d62ff8ac05987e5b1db063d62224383 Mon Sep 17 00:00:00 2001 From: _cry64 Date: Sat, 14 Mar 2026 16:49:15 +1000 Subject: [PATCH] fix my oopid mistakes --- nixos/default.nix | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/nixos/default.nix b/nixos/default.nix index bcc507a..045307a 100644 --- a/nixos/default.nix +++ b/nixos/default.nix @@ -12,8 +12,8 @@ in { enable = mkEnableOption "webserver for wa2k.com"; port = mkOption { - types = types.port; - default = 80; + type = types.port; + default = 8080; example = 8080; description = '' The listening port on localhost to bind the wa2k.com server to. @@ -21,7 +21,7 @@ in { }; openFirewall = mkOption { - types = types.bool; + type = types.bool; default = false; example = true; description = '' @@ -30,13 +30,13 @@ in { }; }; - config = lib.mkIf cfg.enable { - networking.firewall.allowedTCPPorts = lib.optional cfg.openFirewall [cfg.port]; + config = { + networking.firewall.allowedTCPPorts = lib.optional (cfg.enable && cfg.openFirewall) cfg.port; # REF: https://nixos.wiki/wiki/Static_Web_Server services.static-web-server = { - enable = true; - listen = "[::]:${cfg.port}"; + enable = cfg.enable; + listen = "[::]:${builtins.toString cfg.port}"; root = "${pkgs.wa2k-website}/www"; configuration = {