diff --git a/nixos/modules/services/misc/taskserver/default.nix b/nixos/modules/services/misc/taskserver/default.nix index 8f760a4579d4..063002167cf5 100644 --- a/nixos/modules/services/misc/taskserver/default.nix +++ b/nixos/modules/services/misc/taskserver/default.nix @@ -17,9 +17,7 @@ let result = "${key} = ${mkVal val}"; in optionalString (val != null && val != []) result; - needToCreateCA = all isNull (with cfg; [ - server.key server.cert server.crl caCert - ]); + needToCreateCA = all isNull (with cfg.pki; [ key cert crl caCert ]); configFile = pkgs.writeText "taskdrc" '' # systemd related @@ -43,18 +41,18 @@ let # server server = ${cfg.listenHost}:${toString cfg.listenPort} - ${mkConfLine "server.crl" cfg.server.crl} + ${mkConfLine "server.crl" cfg.pki.crl} # certificates - ${mkConfLine "trust" cfg.server.trust} + ${mkConfLine "trust" cfg.pki.trust} ${if needToCreateCA then '' ca.cert = ${cfg.dataDir}/keys/ca.cert server.cert = ${cfg.dataDir}/keys/server.cert server.key = ${cfg.dataDir}/keys/server.key '' else '' - ca.cert = ${cfg.caCert} - server.cert = ${cfg.server.cert} - server.key = ${cfg.server.key} + ca.cert = ${cfg.pki.caCert} + server.cert = ${cfg.pki.cert} + server.key = ${cfg.pki.key} ''} ''; @@ -91,7 +89,7 @@ let certtool = "${pkgs.gnutls}/bin/certtool"; inherit taskd; inherit (cfg) dataDir user group; - inherit (cfg.server) fqdn; + inherit (cfg.pki) fqdn; }}" > "$out/main.py" cat > "$out/setup.py" <