fix my oopid mistakes
This commit is contained in:
parent
6be517516c
commit
49f2a8b48d
1 changed files with 7 additions and 7 deletions
|
|
@ -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 = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue