diff --git a/nixos/modules/services/misc/taskserver/default.nix b/nixos/modules/services/misc/taskserver/default.nix index 86eabb9bcfc8..8f760a4579d4 100644 --- a/nixos/modules/services/misc/taskserver/default.nix +++ b/nixos/modules/services/misc/taskserver/default.nix @@ -42,7 +42,7 @@ let ${mkConfLine "client.deny" cfg.disallowedClientIDs} # server - server = ${cfg.server.host}:${toString cfg.server.port} + server = ${cfg.listenHost}:${toString cfg.listenPort} ${mkConfLine "server.crl" cfg.server.crl} # certificates @@ -245,23 +245,23 @@ in { ''; }; + listenHost = mkOption { + type = types.str; + default = "localhost"; + description = '' + The address (IPv4, IPv6 or DNS) to listen on. + ''; + }; + + listenPort = mkOption { + type = types.int; + default = 53589; + description = '' + Port number of the Taskserver. + ''; + }; + server = { - host = mkOption { - type = types.str; - default = "localhost"; - description = '' - The address (IPv4, IPv6 or DNS) to listen on. - ''; - }; - - port = mkOption { - type = types.int; - default = 53589; - description = '' - Port number of the Taskserver. - ''; - }; - fqdn = mkOption { type = types.str; default = "localhost"; diff --git a/nixos/tests/taskserver.nix b/nixos/tests/taskserver.nix index 413c52a303ec..d588b178aae8 100644 --- a/nixos/tests/taskserver.nix +++ b/nixos/tests/taskserver.nix @@ -5,7 +5,7 @@ import ./make-test.nix { server = { networking.firewall.enable = false; services.taskserver.enable = true; - services.taskserver.server.host = "::"; + services.taskserver.listenHost = "::"; services.taskserver.server.fqdn = "server"; services.taskserver.organisations = { testOrganisation.users = [ "alice" "foo" ]; @@ -27,7 +27,7 @@ import ./make-test.nix { testScript = { nodes, ... }: let cfg = nodes.server.config.services.taskserver; - portStr = toString cfg.server.port; + portStr = toString cfg.listenPort; in '' sub su ($$) { my ($user, $cmd) = @_;