diff options
author | lassulus <lass@aidsballs.de> | 2015-12-20 19:00:20 +0100 |
---|---|---|
committer | lassulus <lass@aidsballs.de> | 2015-12-20 19:00:20 +0100 |
commit | 85f3aa5b86ab9fd4afb7e5adafc0e329ab618102 (patch) | |
tree | b5a8f94d5af87eb24c0df3a85577ab9fe4542419 /makefu/3modules/buildbot/slave.nix | |
parent | 07f4510ad0bff0f9d72e5dcee279a30a0d5f8da3 (diff) | |
parent | 5821d8438578db623a3e248c52fefa424fad0b51 (diff) |
Merge remote-tracking branch 'gum/master'
Diffstat (limited to 'makefu/3modules/buildbot/slave.nix')
-rw-r--r-- | makefu/3modules/buildbot/slave.nix | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/makefu/3modules/buildbot/slave.nix b/makefu/3modules/buildbot/slave.nix index 188a9283c..69d0361bf 100644 --- a/makefu/3modules/buildbot/slave.nix +++ b/makefu/3modules/buildbot/slave.nix @@ -38,7 +38,7 @@ let allow_shutdown=allow_shutdown) s.setServiceParent(application) ''; - + default-packages = [ pkgs.git pkgs.bash ]; cfg = config.makefu.buildbot.slave; api = { @@ -91,6 +91,26 @@ let ''; }; + packages = mkOption { + default = [ pkgs.git ]; + type = with types; listOf package; + description = '' + packages which should be in path for buildslave + ''; + }; + + extraEnviron = mkOption { + default = {}; + example = { + NIX_PATH = "nixpkgs=/path/to/my/nixpkgs"; + }; + type = types.attrsOf types.str; + description = '' + extra environment variables to be provided to the buildslave service + if you need nixpkgs, e.g. for running nix-shell you can set NIX_PATH here. + ''; + }; + extraConfig = mkOption { default = ""; type = types.lines; @@ -121,6 +141,12 @@ let description = "Buildbot Slave for ${cfg.username}@${cfg.masterhost}"; after = [ "network.target" ]; wantedBy = [ "multi-user.target" ]; + path = default-packages ++ cfg.packages; + + environment = { + NIX_REMOTE="daemon"; + } // cfg.extraEnviron; + serviceConfig = let workdir = "${lib.shell.escape cfg.workDir}"; contact = "${lib.shell.escape cfg.contact}"; |