From 98e01cdbfa047a32c1beb73438c5b93ca0592978 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Fri, 10 Jun 2022 11:42:32 -0700 Subject: fix(fmt): correct formatting for all nix files This was done by running `nixpkgs-fmt .'. Change-Id: I4ea6c1e759bf468d08074be2111cbc7af72df295 Reviewed-on: https://cl.fcuny.net/c/world/+/404 Tested-by: CI Reviewed-by: Franck Cuny --- modules/services/buildkite/default.nix | 61 ++++++++++++++++++---------------- 1 file changed, 33 insertions(+), 28 deletions(-) (limited to 'modules/services/buildkite') diff --git a/modules/services/buildkite/default.nix b/modules/services/buildkite/default.nix index 72d5e08..45c7e4f 100644 --- a/modules/services/buildkite/default.nix +++ b/modules/services/buildkite/default.nix @@ -14,7 +14,8 @@ let ln -s ${my-gerrit-hook "post-command"} $out/bin/post-command ''; -in { +in +{ options.my.services.buildkite = with lib; { enable = mkEnableOption "buildkite agent"; }; @@ -22,37 +23,41 @@ in { config = lib.mkIf cfg.enable { # see https://buildkite.com/docs/agent/v3 # and https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/services/continuous-integration/buildkite-agents.nix - services.buildkite-agents = lib.listToAttrs (map (n: rec { - name = "builder-${toString n}"; - value = { - inherit name; - enable = true; - tokenPath = secrets."buildkite/agent".path; - hooks.post-command = "${buildkiteHooks}/bin/post-command"; - runtimePackages = with pkgs; [ - bash - coreutils - curl - git - gnutar - gzip - jq - nix - ]; - }; - }) agents); + services.buildkite-agents = lib.listToAttrs (map + (n: rec { + name = "builder-${toString n}"; + value = { + inherit name; + enable = true; + tokenPath = secrets."buildkite/agent".path; + hooks.post-command = "${buildkiteHooks}/bin/post-command"; + runtimePackages = with pkgs; [ + bash + coreutils + curl + git + gnutar + gzip + jq + nix + ]; + }; + }) + agents); # Set up a group for all Buildkite agent users users = { groups.buildkite-agents = { }; - users = builtins.listToAttrs (map (n: rec { - name = "buildkite-agent-builder-${toString n}"; - value = { - isSystemUser = true; - group = lib.mkForce "buildkite-agents"; - extraGroups = [ name "docker" ]; - }; - }) agents); + users = builtins.listToAttrs (map + (n: rec { + name = "buildkite-agent-builder-${toString n}"; + value = { + isSystemUser = true; + group = lib.mkForce "buildkite-agents"; + extraGroups = [ name "docker" ]; + }; + }) + agents); }; }; } -- cgit 1.4.1