@@ -7,7 +7,6 @@ Platform-specific code is in the respective default.nix files.
77 */
88
99{ config, lib, options, pkgs, ... }:
10−
1110let
1211 inherit (lib)
1312 filterAttrs
@@ -22,7 +21,7 @@ let
2221 cfg =
2322 config.services.hercules-ci-agent;
2423
25− format = pkgs.formats.toml {};
24+ format = pkgs.formats.toml { };
2625
2726 settingsModule = { config, ... }: {
2827 freeformType = format.type;
@@ -91,32 +90,33 @@ let
9190 then ""
9291 else if lib.versionAtLeast config.nix.package.version "2.3.10"
9392 then ""
94− else pkgs.stdenv.mkDerivation {
95− name = "hercules-ci-check-system-nix-src";
96− inherit (config.nix.package) src patches;
97− configurePhase = ":";
98− buildPhase = ''
99− echo "Checking in-memory pathInfoCache expiry"
100− if ! grep 'PathInfoCacheValue' src/libstore/store-api.hh >/dev/null; then
101− cat 1>&2 <<EOF
102−
103− You are deploying Hercules CI Agent on a system with an incompatible
104− nix-daemon. Please make sure nix.package is set to a Nix version of at
105− least 2.3.10 or a master version more recent than Mar 12, 2020.
106− EOF
107− exit 1
108− fi
109− '';
110− installPhase = "touch $out";
111− };
93+ else
94+ pkgs.stdenv.mkDerivation {
95+ name = "hercules-ci-check-system-nix-src";
96+ inherit (config.nix.package) src patches;
97+ configurePhase = ":";
98+ buildPhase = ''
99+ echo "Checking in-memory pathInfoCache expiry"
100+ if ! grep 'PathInfoCacheValue' src/libstore/store-api.hh >/dev/null; then
101+ cat 1>&2 <<EOF
102+
103+ You are deploying Hercules CI Agent on a system with an incompatible
104+ nix-daemon. Please make sure nix.package is set to a Nix version of at
105+ least 2.3.10 or a master version more recent than Mar 12, 2020.
106+ EOF
107+ exit 1
108+ fi
109+ '';
110+ installPhase = "touch $out";
111+ };
112112
113113in
114114{
115115 imports = [
116− (mkRenamedOptionModule ["services" "hercules-ci-agent" "extraOptions"] ["services" "hercules-ci-agent" "settings"])
117− (mkRenamedOptionModule ["services" "hercules-ci-agent" "baseDirectory"] ["services" "hercules-ci-agent" "settings" "baseDirectory"])
118− (mkRenamedOptionModule ["services" "hercules-ci-agent" "concurrentTasks"] ["services" "hercules-ci-agent" "settings" "concurrentTasks"])
119− (mkRemovedOptionModule ["services" "hercules-ci-agent" "patchNix"] "Nix versions packaged in this version of Nixpkgs don't need a patched nix-daemon to work correctly in Hercules CI Agent clusters.")
116+ (mkRenamedOptionModule [ "services" "hercules-ci-agent" "extraOptions" ] [ "services" "hercules-ci-agent" "settings" ])
117+ (mkRenamedOptionModule [ "services" "hercules-ci-agent" "baseDirectory" ] [ "services" "hercules-ci-agent" "settings" "baseDirectory" ])
118+ (mkRenamedOptionModule [ "services" "hercules-ci-agent" "concurrentTasks" ] [ "services" "hercules-ci-agent" "settings" "concurrentTasks" ])
119+ (mkRemovedOptionModule [ "services" "hercules-ci-agent" "patchNix" ] "Nix versions packaged in this version of Nixpkgs don't need a patched nix-daemon to work correctly in Hercules CI Agent clusters.")
120120 ];
121121
122122 options.services.hercules-ci-agent = {