diff options
author | Franck Cuny <franck@fcuny.net> | 2022-06-10 11:42:32 -0700 |
---|---|---|
committer | Franck Cuny <franck@fcuny.net> | 2022-06-10 13:12:35 -0700 |
commit | 98e01cdbfa047a32c1beb73438c5b93ca0592978 (patch) | |
tree | 403b462f1b6d6e4432c010e8f47e179e3e730a97 /modules/services/buildkite | |
parent | docs(gerrit): document various things (diff) | |
download | world-98e01cdbfa047a32c1beb73438c5b93ca0592978.tar.gz |
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 <franck@fcuny.net>
Diffstat (limited to 'modules/services/buildkite')
-rw-r--r-- | modules/services/buildkite/default.nix | 61 |
1 files changed, 33 insertions, 28 deletions
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); }; }; } |