{"action":"created","comment":{"url":"https://api.github.com/repos/NixOS/nixpkgs/pulls/comments/65189153","id":65189153,"diff_hunk":"@@ -0,0 +1,100 @@\n+{ config, lib, pkgs, ... }:\n+\n+with lib;\n+\n+let\n+  cfg = config.services.buildkite-agent;\n+  configFile = pkgs.writeText \"buildkite-agent.cfg\"\n+    ''\n+      token=\"${cfg.token}\"\n+      name=\"${cfg.name}\"\n+      meta-data=\"${cfg.meta-data}\"\n+      hooks-path=\"${pkgs.buildkite-agent}/share/hooks\"\n+      build-path=\"/var/lib/buildkite-agent/builds\"\n+      bootstrap-script=\"${pkgs.buildkite-agent}/share/bootstrap.sh\"\n+    '';\n+in\n+\n+{\n+  options = {\n+    services.buildkite-agent = {\n+      enable = mkEnableOption \"buildkite-agent\";\n+\n+      token = mkOption {\n+        type = types.str;\n+        description = ''\n+          The token from your Buildkite \"Agents\" page.\n+        '';\n+      };\n+\n+      name = mkOption {\n+        type = types.str;\n+        description = ''\n+          The name of the agent.\n+        '';\n+      };\n+\n+      meta-data = mkOption {\n+        type = types.str;\n+        default = \"\";\n+        description = ''\n+          Meta data for the agent.\n+        '';\n+      };\n+\n+      openssh =\n+        { privateKey = mkOption {\n+            type = types.str;\n+            description = ''\n+              Private agent key.\n+            '';\n+          };\n+          publicKey = mkOption {\n+            type = types.str;\n+            description = ''\n+              Public agent key.\n+            '';\n+          };\n+        };\n+    };\n+  };\n+\n+  config = mkIf config.services.buildkite-agent.enable {\n+    users.extraUsers.buildkite-agent =\n+      { name = \"buildkite-agent\";\n+        home = \"/var/lib/buildkite-agent\";\n+        createHome = true;\n+        description = \"Buildkite agent user\";\n+      };\n+\n+    environment.systemPackages = [ pkgs.buildkite-agent ];\n+\n+    systemd.services.buildkite-agent =\n+      { description = \"Buildkite Agent\";\n+        wantedBy = [ \"multi-user.target\" ];\n+        after = [ \"network.target\" ];\n+        environment.HOME = \"/var/lib/buildkite-agent\";","path":"nixos/modules/services/continuous-integration/buildkite-agent.nix","position":76,"original_position":76,"commit_id":"537f6eb875f51c44a00ef15b94cd3b7a3b9c1736","original_commit_id":"537f6eb875f51c44a00ef15b94cd3b7a3b9c1736","user":{"login":"joachifm","id":41977,"avatar_url":"https://avatars.githubusercontent.com/u/41977?v=3","gravatar_id":"","url":"https://api.github.com/users/joachifm","html_url":"https://github.com/joachifm","followers_url":"https://api.github.com/users/joachifm/followers","following_url":"https://api.github.com/users/joachifm/following{/other_user}","gists_url":"https://api.github.com/users/joachifm/gists{/gist_id}","starred_url":"https://api.github.com/users/joachifm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joachifm/subscriptions","organizations_url":"https://api.github.com/users/joachifm/orgs","repos_url":"https://api.github.com/users/joachifm/repos","events_url":"https://api.github.com/users/joachifm/events{/privacy}","received_events_url":"https://api.github.com/users/joachifm/received_events","type":"User","site_admin":false},"body":"I see, I still believe it is unnecessary, but leave it in if you prefer.","created_at":"2016-05-31T14:15:06Z","updated_at":"2016-05-31T14:15:06Z","html_url":"https://github.com/NixOS/nixpkgs/pull/14980#discussion_r65189153","pull_request_url":"https://api.github.com/repos/NixOS/nixpkgs/pulls/14980","_links":{"self":{"href":"https://api.github.com/repos/NixOS/nixpkgs/pulls/comments/65189153"},"html":{"href":"https://github.com/NixOS/nixpkgs/pull/14980#discussion_r65189153"},"pull_request":{"href":"https://api.github.com/repos/NixOS/nixpkgs/pulls/14980"}}},"pull_request":{"url":"https://api.github.com/repos/NixOS/nixpkgs/pulls/14980","id":67749413,"html_url":"https://github.com/NixOS/nixpkgs/pull/14980","diff_url":"https://github.com/NixOS/nixpkgs/pull/14980.diff","patch_url":"https://github.com/NixOS/nixpkgs/pull/14980.patch","issue_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/14980","number":14980,"state":"open","locked":false,"title":"buildkite-agent: init at 2.1.8","user":{"login":"pawelpacana","id":116740,"avatar_url":"https://avatars.githubusercontent.com/u/116740?v=3","gravatar_id":"","url":"https://api.github.com/users/pawelpacana","html_url":"https://github.com/pawelpacana","followers_url":"https://api.github.com/users/pawelpacana/followers","following_url":"https://api.github.com/users/pawelpacana/following{/other_user}","gists_url":"https://api.github.com/users/pawelpacana/gists{/gist_id}","starred_url":"https://api.github.com/users/pawelpacana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pawelpacana/subscriptions","organizations_url":"https://api.github.com/users/pawelpacana/orgs","repos_url":"https://api.github.com/users/pawelpacana/repos","events_url":"https://api.github.com/users/pawelpacana/events{/privacy}","received_events_url":"https://api.github.com/users/pawelpacana/received_events","type":"User","site_admin":false},"body":"###### Things done\r\n\r\n- [x] Tested using sandboxing (`nix-build --option build-use-sandbox true` or [nix.useSandbox](http://nixos.org/nixos/manual/options.html#opt-nix.useSandbox) on NixOS)\r\n- Built on platform(s)\r\n   - [x] NixOS\r\n   - [ ] OS X\r\n   - [ ] Linux\r\n- [ ] Tested compilation of all pkgs that depend on this change using `nix-shell -p nox --run \"nox-review wip\"`\r\n- [x] Tested execution of all binary files (usually in `./result/bin/`)\r\n- [x] Fits [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/.github/CONTRIBUTING.md).\r\n\r\n---\r\n\r\nThe buildkite agent is a build runner for buildkite.com service\r\n\r\n","created_at":"2016-04-25T16:30:57Z","updated_at":"2016-05-31T14:15:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3b262bd8e0ffcf87f9823cd1c31c452edb6d59bf","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/NixOS/nixpkgs/pulls/14980/commits","review_comments_url":"https://api.github.com/repos/NixOS/nixpkgs/pulls/14980/comments","review_comment_url":"https://api.github.com/repos/NixOS/nixpkgs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/14980/comments","statuses_url":"https://api.github.com/repos/NixOS/nixpkgs/statuses/537f6eb875f51c44a00ef15b94cd3b7a3b9c1736","head":{"label":"arkency:buildkite-agent-upstream","ref":"buildkite-agent-upstream","sha":"537f6eb875f51c44a00ef15b94cd3b7a3b9c1736","user":{"login":"arkency","id":94726,"avatar_url":"https://avatars.githubusercontent.com/u/94726?v=3","gravatar_id":"","url":"https://api.github.com/users/arkency","html_url":"https://github.com/arkency","followers_url":"https://api.github.com/users/arkency/followers","following_url":"https://api.github.com/users/arkency/following{/other_user}","gists_url":"https://api.github.com/users/arkency/gists{/gist_id}","starred_url":"https://api.github.com/users/arkency/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arkency/subscriptions","organizations_url":"https://api.github.com/users/arkency/orgs","repos_url":"https://api.github.com/users/arkency/repos","events_url":"https://api.github.com/users/arkency/events{/privacy}","received_events_url":"https://api.github.com/users/arkency/received_events","type":"Organization","site_admin":false},"repo":{"id":53541157,"name":"nixpkgs","full_name":"arkency/nixpkgs","owner":{"login":"arkency","id":94726,"avatar_url":"https://avatars.githubusercontent.com/u/94726?v=3","gravatar_id":"","url":"https://api.github.com/users/arkency","html_url":"https://github.com/arkency","followers_url":"https://api.github.com/users/arkency/followers","following_url":"https://api.github.com/users/arkency/following{/other_user}","gists_url":"https://api.github.com/users/arkency/gists{/gist_id}","starred_url":"https://api.github.com/users/arkency/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arkency/subscriptions","organizations_url":"https://api.github.com/users/arkency/orgs","repos_url":"https://api.github.com/users/arkency/repos","events_url":"https://api.github.com/users/arkency/events{/privacy}","received_events_url":"https://api.github.com/users/arkency/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/arkency/nixpkgs","description":"Nix Packages collection","fork":true,"url":"https://api.github.com/repos/arkency/nixpkgs","forks_url":"https://api.github.com/repos/arkency/nixpkgs/forks","keys_url":"https://api.github.com/repos/arkency/nixpkgs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/arkency/nixpkgs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/arkency/nixpkgs/teams","hooks_url":"https://api.github.com/repos/arkency/nixpkgs/hooks","issue_events_url":"https://api.github.com/repos/arkency/nixpkgs/issues/events{/number}","events_url":"https://api.github.com/repos/arkency/nixpkgs/events","assignees_url":"https://api.github.com/repos/arkency/nixpkgs/assignees{/user}","branches_url":"https://api.github.com/repos/arkency/nixpkgs/branches{/branch}","tags_url":"https://api.github.com/repos/arkency/nixpkgs/tags","blobs_url":"https://api.github.com/repos/arkency/nixpkgs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/arkency/nixpkgs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/arkency/nixpkgs/git/refs{/sha}","trees_url":"https://api.github.com/repos/arkency/nixpkgs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/arkency/nixpkgs/statuses/{sha}","languages_url":"https://api.github.com/repos/arkency/nixpkgs/languages","stargazers_url":"https://api.github.com/repos/arkency/nixpkgs/stargazers","contributors_url":"https://api.github.com/repos/arkency/nixpkgs/contributors","subscribers_url":"https://api.github.com/repos/arkency/nixpkgs/subscribers","subscription_url":"https://api.github.com/repos/arkency/nixpkgs/subscription","commits_url":"https://api.github.com/repos/arkency/nixpkgs/commits{/sha}","git_commits_url":"https://api.github.com/repos/arkency/nixpkgs/git/commits{/sha}","comments_url":"https://api.github.com/repos/arkency/nixpkgs/comments{/number}","issue_comment_url":"https://api.github.com/repos/arkency/nixpkgs/issues/comments{/number}","contents_url":"https://api.github.com/repos/arkency/nixpkgs/contents/{+path}","compare_url":"https://api.github.com/repos/arkency/nixpkgs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/arkency/nixpkgs/merges","archive_url":"https://api.github.com/repos/arkency/nixpkgs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/arkency/nixpkgs/downloads","issues_url":"https://api.github.com/repos/arkency/nixpkgs/issues{/number}","pulls_url":"https://api.github.com/repos/arkency/nixpkgs/pulls{/number}","milestones_url":"https://api.github.com/repos/arkency/nixpkgs/milestones{/number}","notifications_url":"https://api.github.com/repos/arkency/nixpkgs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/arkency/nixpkgs/labels{/name}","releases_url":"https://api.github.com/repos/arkency/nixpkgs/releases{/id}","deployments_url":"https://api.github.com/repos/arkency/nixpkgs/deployments","created_at":"2016-03-10T00:04:41Z","updated_at":"2016-03-10T00:05:02Z","pushed_at":"2016-05-31T14:05:21Z","git_url":"git://github.com/arkency/nixpkgs.git","ssh_url":"git@github.com:arkency/nixpkgs.git","clone_url":"https://github.com/arkency/nixpkgs.git","svn_url":"https://github.com/arkency/nixpkgs","homepage":null,"size":331676,"stargazers_count":0,"watchers_count":0,"language":"Nix","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"NixOS:master","ref":"master","sha":"228331cc7d04219a340d7825985bd7b9dcae9cd9","user":{"login":"NixOS","id":487568,"avatar_url":"https://avatars.githubusercontent.com/u/487568?v=3","gravatar_id":"","url":"https://api.github.com/users/NixOS","html_url":"https://github.com/NixOS","followers_url":"https://api.github.com/users/NixOS/followers","following_url":"https://api.github.com/users/NixOS/following{/other_user}","gists_url":"https://api.github.com/users/NixOS/gists{/gist_id}","starred_url":"https://api.github.com/users/NixOS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NixOS/subscriptions","organizations_url":"https://api.github.com/users/NixOS/orgs","repos_url":"https://api.github.com/users/NixOS/repos","events_url":"https://api.github.com/users/NixOS/events{/privacy}","received_events_url":"https://api.github.com/users/NixOS/received_events","type":"Organization","site_admin":false},"repo":{"id":4542716,"name":"nixpkgs","full_name":"NixOS/nixpkgs","owner":{"login":"NixOS","id":487568,"avatar_url":"https://avatars.githubusercontent.com/u/487568?v=3","gravatar_id":"","url":"https://api.github.com/users/NixOS","html_url":"https://github.com/NixOS","followers_url":"https://api.github.com/users/NixOS/followers","following_url":"https://api.github.com/users/NixOS/following{/other_user}","gists_url":"https://api.github.com/users/NixOS/gists{/gist_id}","starred_url":"https://api.github.com/users/NixOS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NixOS/subscriptions","organizations_url":"https://api.github.com/users/NixOS/orgs","repos_url":"https://api.github.com/users/NixOS/repos","events_url":"https://api.github.com/users/NixOS/events{/privacy}","received_events_url":"https://api.github.com/users/NixOS/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/NixOS/nixpkgs","description":"Nix Packages collection","fork":false,"url":"https://api.github.com/repos/NixOS/nixpkgs","forks_url":"https://api.github.com/repos/NixOS/nixpkgs/forks","keys_url":"https://api.github.com/repos/NixOS/nixpkgs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NixOS/nixpkgs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NixOS/nixpkgs/teams","hooks_url":"https://api.github.com/repos/NixOS/nixpkgs/hooks","issue_events_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/events{/number}","events_url":"https://api.github.com/repos/NixOS/nixpkgs/events","assignees_url":"https://api.github.com/repos/NixOS/nixpkgs/assignees{/user}","branches_url":"https://api.github.com/repos/NixOS/nixpkgs/branches{/branch}","tags_url":"https://api.github.com/repos/NixOS/nixpkgs/tags","blobs_url":"https://api.github.com/repos/NixOS/nixpkgs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NixOS/nixpkgs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NixOS/nixpkgs/git/refs{/sha}","trees_url":"https://api.github.com/repos/NixOS/nixpkgs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NixOS/nixpkgs/statuses/{sha}","languages_url":"https://api.github.com/repos/NixOS/nixpkgs/languages","stargazers_url":"https://api.github.com/repos/NixOS/nixpkgs/stargazers","contributors_url":"https://api.github.com/repos/NixOS/nixpkgs/contributors","subscribers_url":"https://api.github.com/repos/NixOS/nixpkgs/subscribers","subscription_url":"https://api.github.com/repos/NixOS/nixpkgs/subscription","commits_url":"https://api.github.com/repos/NixOS/nixpkgs/commits{/sha}","git_commits_url":"https://api.github.com/repos/NixOS/nixpkgs/git/commits{/sha}","comments_url":"https://api.github.com/repos/NixOS/nixpkgs/comments{/number}","issue_comment_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/comments{/number}","contents_url":"https://api.github.com/repos/NixOS/nixpkgs/contents/{+path}","compare_url":"https://api.github.com/repos/NixOS/nixpkgs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NixOS/nixpkgs/merges","archive_url":"https://api.github.com/repos/NixOS/nixpkgs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NixOS/nixpkgs/downloads","issues_url":"https://api.github.com/repos/NixOS/nixpkgs/issues{/number}","pulls_url":"https://api.github.com/repos/NixOS/nixpkgs/pulls{/number}","milestones_url":"https://api.github.com/repos/NixOS/nixpkgs/milestones{/number}","notifications_url":"https://api.github.com/repos/NixOS/nixpkgs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NixOS/nixpkgs/labels{/name}","releases_url":"https://api.github.com/repos/NixOS/nixpkgs/releases{/id}","deployments_url":"https://api.github.com/repos/NixOS/nixpkgs/deployments","created_at":"2012-06-04T02:49:46Z","updated_at":"2016-05-31T12:34:11Z","pushed_at":"2016-05-31T14:13:11Z","git_url":"git://github.com/NixOS/nixpkgs.git","ssh_url":"git@github.com:NixOS/nixpkgs.git","clone_url":"https://github.com/NixOS/nixpkgs.git","svn_url":"https://github.com/NixOS/nixpkgs","homepage":null,"size":550244,"stargazers_count":1132,"watchers_count":1132,"language":"Nix","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1422,"mirror_url":null,"open_issues_count":1403,"forks":1422,"open_issues":1403,"watchers":1132,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/NixOS/nixpkgs/pulls/14980"},"html":{"href":"https://github.com/NixOS/nixpkgs/pull/14980"},"issue":{"href":"https://api.github.com/repos/NixOS/nixpkgs/issues/14980"},"comments":{"href":"https://api.github.com/repos/NixOS/nixpkgs/issues/14980/comments"},"review_comments":{"href":"https://api.github.com/repos/NixOS/nixpkgs/pulls/14980/comments"},"review_comment":{"href":"https://api.github.com/repos/NixOS/nixpkgs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/NixOS/nixpkgs/pulls/14980/commits"},"statuses":{"href":"https://api.github.com/repos/NixOS/nixpkgs/statuses/537f6eb875f51c44a00ef15b94cd3b7a3b9c1736"}}}}
{"actor":{"display_login":"joachifm"}}