nixos/jenkins-job-builder: better defaults for accessUser/accessTokenFile

The new defaults allows jenkins-job-builder to reload the configuration
out-of-the-box, whereas the previous defaults required users to manually
reload/restart jenkins, or configure accessUser/accessTokenFile
themselves.

(If `extraJavaOptions = [ "-Djenkins.install.runSetupWizard=false" ]`
then the initial admin user is *not* created and you have to use JCasC
or something else to bootstrap.)
This commit is contained in:
Bjørn Forsman
2022-07-26 09:58:24 +02:00
parent a8a8a9e2e7
commit fcf81f91a3
2 changed files with 3 additions and 4 deletions

View File

@@ -30,7 +30,7 @@ in {
};
accessUser = mkOption {
default = "";
default = "admin";
type = types.str;
description = lib.mdDoc ''
User id in Jenkins used to reload config.
@@ -48,7 +48,8 @@ in {
};
accessTokenFile = mkOption {
default = "";
default = "${config.services.jenkins.home}/secrets/initialAdminPassword";
defaultText = literalExpression ''"''${config.services.jenkins.home}/secrets/initialAdminPassword"'';
type = types.str;
example = "/run/keys/jenkins-job-builder-access-token";
description = lib.mdDoc ''