{"action":"created","comment":{"url":"https://api.github.com/repos/NixOS/nixpkgs/pulls/comments/78009527","id":78009527,"diff_hunk":"@@ -10,7 +10,8 @@ let\n \n   interfaces = attrValues config.networking.interfaces;\n \n-  enableDHCP = config.networking.useDHCP || any (i: i.useDHCP == true) interfaces;\n+  enableDHCP = config.networking.dhcpcd.enable &&\n+        (config.networking.useDHCP || any (i: i.useDHCP == true) interfaces);","path":"nixos/modules/services/networking/dhcpcd.nix","position":6,"original_position":6,"commit_id":"2a1b2c66c13ceb64ea354a14924e3c347dad03b1","original_commit_id":"2a1b2c66c13ceb64ea354a14924e3c347dad03b1","user":{"login":"edolstra","id":1148549,"avatar_url":"https://avatars.githubusercontent.com/u/1148549?v=3","gravatar_id":"","url":"https://api.github.com/users/edolstra","html_url":"https://github.com/edolstra","followers_url":"https://api.github.com/users/edolstra/followers","following_url":"https://api.github.com/users/edolstra/following{/other_user}","gists_url":"https://api.github.com/users/edolstra/gists{/gist_id}","starred_url":"https://api.github.com/users/edolstra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edolstra/subscriptions","organizations_url":"https://api.github.com/users/edolstra/orgs","repos_url":"https://api.github.com/users/edolstra/repos","events_url":"https://api.github.com/users/edolstra/events{/privacy}","received_events_url":"https://api.github.com/users/edolstra/received_events","type":"User","site_admin":false},"body":"Or maybe just\r\n```\r\nenableDHCP = !config.systemd.networkd.useNetworkd && (config.networking.useDHCP || any (i: i.useDHCP == true) interfaces);\r\n```\r\nThat way no new option is needed.","created_at":"2016-09-08T13:52:16Z","updated_at":"2016-09-08T13:52:16Z","html_url":"https://github.com/NixOS/nixpkgs/pull/18436#discussion_r78009527","pull_request_url":"https://api.github.com/repos/NixOS/nixpkgs/pulls/18436","_links":{"self":{"href":"https://api.github.com/repos/NixOS/nixpkgs/pulls/comments/78009527"},"html":{"href":"https://github.com/NixOS/nixpkgs/pull/18436#discussion_r78009527"},"pull_request":{"href":"https://api.github.com/repos/NixOS/nixpkgs/pulls/18436"}}},"pull_request":{"url":"https://api.github.com/repos/NixOS/nixpkgs/pulls/18436","id":84480431,"html_url":"https://github.com/NixOS/nixpkgs/pull/18436","diff_url":"https://github.com/NixOS/nixpkgs/pull/18436.diff","patch_url":"https://github.com/NixOS/nixpkgs/pull/18436.patch","issue_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/18436","number":18436,"state":"open","locked":false,"title":"networking.dhcpcd: Don't add to system closure when using networkd","user":{"login":"groxxda","id":5701271,"avatar_url":"https://avatars.githubusercontent.com/u/5701271?v=3","gravatar_id":"","url":"https://api.github.com/users/groxxda","html_url":"https://github.com/groxxda","followers_url":"https://api.github.com/users/groxxda/followers","following_url":"https://api.github.com/users/groxxda/following{/other_user}","gists_url":"https://api.github.com/users/groxxda/gists{/gist_id}","starred_url":"https://api.github.com/users/groxxda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/groxxda/subscriptions","organizations_url":"https://api.github.com/users/groxxda/orgs","repos_url":"https://api.github.com/users/groxxda/repos","events_url":"https://api.github.com/users/groxxda/events{/privacy}","received_events_url":"https://api.github.com/users/groxxda/received_events","type":"User","site_admin":false},"body":"###### Motivation for this change\r\nEven on systems that used networkd instead of dhcpcd, dhcpcd was added to the system closure. The networkd module only disabled the dhcpcd **systemd service** not the entire module.\r\nThis is an effort to reduce closure size for containers.\r\n\r\nI don't override `networking.useDHCP` because that option should also be relevant on systems using networkd.\r\n###### Things done\r\n\r\n- [x] Tested using sandboxing\r\n  ([nix.useSandbox](http://nixos.org/nixos/manual/options.html#opt-nix.useSandbox) on NixOS,\r\n    or option `build-use-sandbox` in [`nix.conf`](http://nixos.org/nix/manual/#sec-conf-file)\r\n    on non-NixOS)\r\n- Built on platform(s)\r\n   - [x] NixOS\r\n   - [ ] OS X\r\n   - [ ] Linux\r\n- [x] Fits [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/.github/CONTRIBUTING.md).\r\n\r\n---\r\n","created_at":"2016-09-08T13:46:24Z","updated_at":"2016-09-08T13:52:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0ad1c14497e5fd0ddfee09fae9c67557ccc9e170","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/NixOS/nixpkgs/pulls/18436/commits","review_comments_url":"https://api.github.com/repos/NixOS/nixpkgs/pulls/18436/comments","review_comment_url":"https://api.github.com/repos/NixOS/nixpkgs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/18436/comments","statuses_url":"https://api.github.com/repos/NixOS/nixpkgs/statuses/2a1b2c66c13ceb64ea354a14924e3c347dad03b1","head":{"label":"groxxda:closureSize","ref":"closureSize","sha":"2a1b2c66c13ceb64ea354a14924e3c347dad03b1","user":{"login":"groxxda","id":5701271,"avatar_url":"https://avatars.githubusercontent.com/u/5701271?v=3","gravatar_id":"","url":"https://api.github.com/users/groxxda","html_url":"https://github.com/groxxda","followers_url":"https://api.github.com/users/groxxda/followers","following_url":"https://api.github.com/users/groxxda/following{/other_user}","gists_url":"https://api.github.com/users/groxxda/gists{/gist_id}","starred_url":"https://api.github.com/users/groxxda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/groxxda/subscriptions","organizations_url":"https://api.github.com/users/groxxda/orgs","repos_url":"https://api.github.com/users/groxxda/repos","events_url":"https://api.github.com/users/groxxda/events{/privacy}","received_events_url":"https://api.github.com/users/groxxda/received_events","type":"User","site_admin":false},"repo":{"id":31596664,"name":"nixpkgs","full_name":"groxxda/nixpkgs","owner":{"login":"groxxda","id":5701271,"avatar_url":"https://avatars.githubusercontent.com/u/5701271?v=3","gravatar_id":"","url":"https://api.github.com/users/groxxda","html_url":"https://github.com/groxxda","followers_url":"https://api.github.com/users/groxxda/followers","following_url":"https://api.github.com/users/groxxda/following{/other_user}","gists_url":"https://api.github.com/users/groxxda/gists{/gist_id}","starred_url":"https://api.github.com/users/groxxda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/groxxda/subscriptions","organizations_url":"https://api.github.com/users/groxxda/orgs","repos_url":"https://api.github.com/users/groxxda/repos","events_url":"https://api.github.com/users/groxxda/events{/privacy}","received_events_url":"https://api.github.com/users/groxxda/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/groxxda/nixpkgs","description":"Nix Packages collection","fork":true,"url":"https://api.github.com/repos/groxxda/nixpkgs","forks_url":"https://api.github.com/repos/groxxda/nixpkgs/forks","keys_url":"https://api.github.com/repos/groxxda/nixpkgs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/groxxda/nixpkgs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/groxxda/nixpkgs/teams","hooks_url":"https://api.github.com/repos/groxxda/nixpkgs/hooks","issue_events_url":"https://api.github.com/repos/groxxda/nixpkgs/issues/events{/number}","events_url":"https://api.github.com/repos/groxxda/nixpkgs/events","assignees_url":"https://api.github.com/repos/groxxda/nixpkgs/assignees{/user}","branches_url":"https://api.github.com/repos/groxxda/nixpkgs/branches{/branch}","tags_url":"https://api.github.com/repos/groxxda/nixpkgs/tags","blobs_url":"https://api.github.com/repos/groxxda/nixpkgs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/groxxda/nixpkgs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/groxxda/nixpkgs/git/refs{/sha}","trees_url":"https://api.github.com/repos/groxxda/nixpkgs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/groxxda/nixpkgs/statuses/{sha}","languages_url":"https://api.github.com/repos/groxxda/nixpkgs/languages","stargazers_url":"https://api.github.com/repos/groxxda/nixpkgs/stargazers","contributors_url":"https://api.github.com/repos/groxxda/nixpkgs/contributors","subscribers_url":"https://api.github.com/repos/groxxda/nixpkgs/subscribers","subscription_url":"https://api.github.com/repos/groxxda/nixpkgs/subscription","commits_url":"https://api.github.com/repos/groxxda/nixpkgs/commits{/sha}","git_commits_url":"https://api.github.com/repos/groxxda/nixpkgs/git/commits{/sha}","comments_url":"https://api.github.com/repos/groxxda/nixpkgs/comments{/number}","issue_comment_url":"https://api.github.com/repos/groxxda/nixpkgs/issues/comments{/number}","contents_url":"https://api.github.com/repos/groxxda/nixpkgs/contents/{+path}","compare_url":"https://api.github.com/repos/groxxda/nixpkgs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/groxxda/nixpkgs/merges","archive_url":"https://api.github.com/repos/groxxda/nixpkgs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/groxxda/nixpkgs/downloads","issues_url":"https://api.github.com/repos/groxxda/nixpkgs/issues{/number}","pulls_url":"https://api.github.com/repos/groxxda/nixpkgs/pulls{/number}","milestones_url":"https://api.github.com/repos/groxxda/nixpkgs/milestones{/number}","notifications_url":"https://api.github.com/repos/groxxda/nixpkgs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/groxxda/nixpkgs/labels{/name}","releases_url":"https://api.github.com/repos/groxxda/nixpkgs/releases{/id}","deployments_url":"https://api.github.com/repos/groxxda/nixpkgs/deployments","created_at":"2015-03-03T12:13:56Z","updated_at":"2016-04-08T20:57:01Z","pushed_at":"2016-09-08T13:42:33Z","git_url":"git://github.com/groxxda/nixpkgs.git","ssh_url":"git@github.com:groxxda/nixpkgs.git","clone_url":"https://github.com/groxxda/nixpkgs.git","svn_url":"https://github.com/groxxda/nixpkgs","homepage":null,"size":332701,"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":"75baee8523f62b75a0cf350a8360ce8f3e3c3695","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-09-08T13:16:10Z","pushed_at":"2016-09-08T13:51:28Z","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":585693,"stargazers_count":1277,"watchers_count":1277,"language":"Nix","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1600,"mirror_url":null,"open_issues_count":1539,"forks":1600,"open_issues":1539,"watchers":1277,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/NixOS/nixpkgs/pulls/18436"},"html":{"href":"https://github.com/NixOS/nixpkgs/pull/18436"},"issue":{"href":"https://api.github.com/repos/NixOS/nixpkgs/issues/18436"},"comments":{"href":"https://api.github.com/repos/NixOS/nixpkgs/issues/18436/comments"},"review_comments":{"href":"https://api.github.com/repos/NixOS/nixpkgs/pulls/18436/comments"},"review_comment":{"href":"https://api.github.com/repos/NixOS/nixpkgs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/NixOS/nixpkgs/pulls/18436/commits"},"statuses":{"href":"https://api.github.com/repos/NixOS/nixpkgs/statuses/2a1b2c66c13ceb64ea354a14924e3c347dad03b1"}}}}
{"actor":{"display_login":"edolstra"}}