From 93942c0a662b7c6ad80810ae9f99f80988a27b1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sun, 14 Jul 2024 18:20:59 +0200 Subject: [PATCH] also introduce buildbotNixpkgs for buildbot-worker module --- flake.nix | 2 +- nix/worker.nix | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/flake.nix b/flake.nix index 6f11d63..0995490 100644 --- a/flake.nix +++ b/flake.nix @@ -29,7 +29,7 @@ nixosModules.buildbot-worker.imports = [ ./nix/worker.nix ({ pkgs, ... }: { - services.buildbot-nix.worker.package = lib.mkDefault inputs.nixpkgs.legacyPackages.${pkgs.hostPlatform.system}.buildbot-worker; + services.buildbot-nix.worker.buildbotNixpkgs = lib.mkDefault inputs.nixpkgs.legacyPackages.${pkgs.hostPlatform.system}; }) ]; diff --git a/nix/worker.nix b/nix/worker.nix index cdfb307..f30dd19 100644 --- a/nix/worker.nix +++ b/nix/worker.nix @@ -19,9 +19,13 @@ in default = config.networking.hostName; description = "The buildbot worker name."; }; + buildbotNixpkgs = lib.mkOption { + type = lib.types.raw; + description = "Nixpkgs to use for buildbot packages"; + }; package = lib.mkOption { type = lib.types.package; - default = pkgs.buildbot-worker; + default = cfg.buildbotNixpkgs.buildbot-worker; defaultText = "pkgs.buildbot-worker"; description = "The buildbot-worker package to use."; }; @@ -88,7 +92,7 @@ in # Restart buildbot with a delay. This time way we can use buildbot to deploy itself. ExecReload = "+${config.systemd.package}/bin/systemd-run --on-active=60 ${config.systemd.package}/bin/systemctl restart buildbot-worker"; ExecStart = lib.traceIf - (lib.versionOlder pkgs.buildbot-worker.version "4.0.0") + (lib.versionOlder cfg.package.version "4.0.0") '' `buildbot-nix` recommends `buildbot-worker` to be at least of version `4.0.0`. Consider upgrading by setting `services.buildbot-nix.worker.package` i.e. from nixpkgs-unstable.