git.iko.soy/typeable/nixpkgs
on master help sign in
nixos/hercules-ci-agent: Format with nixpkgs-fmt
commitfbabab7b169dbe5ae9656b6e681b27d4af70931e authorRobert Hensing <robert@roberthensing.nl> dateWed 10 Feb 2021, 09:49 (6 years ago) parenta1b1e5a
2 files changed+26−28
nixos/modules/services/continuous-integration/hercules-ci-agent/common.nix+24−24 nixos/modules/services/continuous-integration/hercules-ci-agent/default.nix+2−4
nixos/modules/services/continuous-integration/hercules-ci-agent/common.nix+24−24
@@ -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 = {
nixos/modules/services/continuous-integration/hercules-ci-agent/default.nix+2−4
@@ -7,9 +7,7 @@ Code that is shared with nix-darwin goes in common.nix.
77 */
88
99{ pkgs, config, lib, ... }:
10−
1110let
12−
1311 inherit (lib) mkIf mkDefault;
1412
1513 cfg = config.services.hercules-ci-agent;
@@ -21,7 +19,7 @@ in
2119{
2220 imports = [
2321 ./common.nix
24− (lib.mkRenamedOptionModule ["services" "hercules-ci-agent" "user"] ["systemd" "services" "hercules-ci-agent" "serviceConfig" "User"])
22+ (lib.mkRenamedOptionModule [ "services" "hercules-ci-agent" "user" ] [ "systemd" "services" "hercules-ci-agent" "serviceConfig" "User" ])
2523 ];
2624
2725 config = mkIf cfg.enable {
@@ -80,6 +78,6 @@ in
8078 isSystemUser = true;
8179 };
8280
83− users.groups.hercules-ci-agent = {};
81+ users.groups.hercules-ci-agent = { };
8482 };
8583}