{"action":"created","comment":{"url":"https://api.github.com/repos/NixOS/nixpkgs/pulls/comments/165840288","pull_request_review_id":93841345,"id":165840288,"diff_hunk":"@@ -0,0 +1,77 @@\n+{ config, lib, pkgs, ... }:\n+\n+with lib;\n+\n+let\n+\n+  cfg = config.services.freeradius;\n+\n+    freeradiusService = cfg: optionalAttrs cfg.enable {\n+    freeradius = {\n+      description = \"FreeRadius server\";\n+      wantedBy = [\"multi-user.target\"];\n+      after = [\"network-online.target\"];\n+      requires = [\"network-online.target\"];\n+      preStart = ''\n+        ${cfg.configDir}/certs/bootstrap\n+        ${pkgs.freeradius}/bin/radiusd -C -d ${cfg.configDir} -l stdout\n+      '';\n+\n+      serviceConfig = {\n+          ExecStart = \"${pkgs.freeradius}/bin/radiusd -f -d ${cfg.configDir} -l stdout -xx\";\n+          ExecReload = [\n+            \"${pkgs.freeradius}/bin/radiusd -C -d ${cfg.configDir}  -l stdout\"\n+            \"${pkgs.coreutils}/bin/kill -HUP $MAINPID\"\n+          ];\n+          User = \"radius\";\n+      };\n+    };\n+  };\n+\n+  freeradiusConfig = {\n+\n+    enable = mkOption {","path":"nixos/modules/services/networking/freeradius.nix","position":33,"original_position":33,"commit_id":"856d7bb0a78e48381933657e67c7e850a0681f40","original_commit_id":"856d7bb0a78e48381933657e67c7e850a0681f40","user":{"login":"dotlambda","id":6806011,"avatar_url":"https://avatars2.githubusercontent.com/u/6806011?v=4","gravatar_id":"","url":"https://api.github.com/users/dotlambda","html_url":"https://github.com/dotlambda","followers_url":"https://api.github.com/users/dotlambda/followers","following_url":"https://api.github.com/users/dotlambda/following{/other_user}","gists_url":"https://api.github.com/users/dotlambda/gists{/gist_id}","starred_url":"https://api.github.com/users/dotlambda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotlambda/subscriptions","organizations_url":"https://api.github.com/users/dotlambda/orgs","repos_url":"https://api.github.com/users/dotlambda/repos","events_url":"https://api.github.com/users/dotlambda/events{/privacy}","received_events_url":"https://api.github.com/users/dotlambda/received_events","type":"User","site_admin":false},"body":"Use `mkEnableOption`","created_at":"2018-02-04T10:46:16Z","updated_at":"2018-02-04T10:50:25Z","html_url":"https://github.com/NixOS/nixpkgs/pull/34587#discussion_r165840288","pull_request_url":"https://api.github.com/repos/NixOS/nixpkgs/pulls/34587","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/NixOS/nixpkgs/pulls/comments/165840288"},"html":{"href":"https://github.com/NixOS/nixpkgs/pull/34587#discussion_r165840288"},"pull_request":{"href":"https://api.github.com/repos/NixOS/nixpkgs/pulls/34587"}}},"pull_request":{"url":"https://api.github.com/repos/NixOS/nixpkgs/pulls/34587","id":167004280,"html_url":"https://github.com/NixOS/nixpkgs/pull/34587","diff_url":"https://github.com/NixOS/nixpkgs/pull/34587.diff","patch_url":"https://github.com/NixOS/nixpkgs/pull/34587.patch","issue_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/34587","number":34587,"state":"open","locked":false,"title":"nixos/freeradius : init - Added freeradius service","user":{"login":"netixx","id":1488603,"avatar_url":"https://avatars2.githubusercontent.com/u/1488603?v=4","gravatar_id":"","url":"https://api.github.com/users/netixx","html_url":"https://github.com/netixx","followers_url":"https://api.github.com/users/netixx/followers","following_url":"https://api.github.com/users/netixx/following{/other_user}","gists_url":"https://api.github.com/users/netixx/gists{/gist_id}","starred_url":"https://api.github.com/users/netixx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/netixx/subscriptions","organizations_url":"https://api.github.com/users/netixx/orgs","repos_url":"https://api.github.com/users/netixx/repos","events_url":"https://api.github.com/users/netixx/events{/privacy}","received_events_url":"https://api.github.com/users/netixx/received_events","type":"User","site_admin":false},"body":"Resubmit because of branch mixup\r\n\r\nInspired from the dhcpd service implementation\r\nOnly 2 configurations options at the moment:\r\nenabled and path to configfile\r\n\r\nfolder networking has been chosen because radius is mainly used for network device and network authentication (e.g. WPA2 Entreprise)\r\n\r\n###### Motivation for this change\r\nFreeradius package is already supported by nix, but no service exists for nixos. This patch adds basic support to start the freeradius service.\r\n\r\n###### Things done\r\n\r\nI tested the service configuration in my personal nix installation successfully.\r\n<!-- Please check what applies. Note that these are not hard requirements but merely serve as information for reviewers. -->\r\n\r\n- [ ] Tested using sandboxing ([nix.useSandbox](http://nixos.org/nixos/manual/options.html#opt-nix.useSandbox) on NixOS, or option `build-use-sandbox` in [`nix.conf`](http://nixos.org/nix/manual/#sec-conf-file) on non-NixOS)\r\n- Built on platform(s)\r\n   - [ ] NixOS\r\n   - [ ] macOS\r\n   - [ ] other Linux distributions\r\n- [ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside [nixos/tests](https://github.com/NixOS/nixpkgs/blob/master/nixos/tests))\r\n- [ ] Tested compilation of all pkgs that depend on this change using `nix-shell -p nox --run \"nox-review wip\"`\r\n- [ ] Tested execution of all binary files (usually in `./result/bin/`)\r\n- [ ] Fits [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/.github/CONTRIBUTING.md).\r\n\r\n---","created_at":"2018-02-04T10:36:24Z","updated_at":"2018-02-04T10:50:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d0f2ca17c905ffa2da906fca15d2accb07d53008","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"milestone":null,"commits_url":"https://api.github.com/repos/NixOS/nixpkgs/pulls/34587/commits","review_comments_url":"https://api.github.com/repos/NixOS/nixpkgs/pulls/34587/comments","review_comment_url":"https://api.github.com/repos/NixOS/nixpkgs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/34587/comments","statuses_url":"https://api.github.com/repos/NixOS/nixpkgs/statuses/856d7bb0a78e48381933657e67c7e850a0681f40","head":{"label":"netixx:add-freeradius-service","ref":"add-freeradius-service","sha":"856d7bb0a78e48381933657e67c7e850a0681f40","user":{"login":"netixx","id":1488603,"avatar_url":"https://avatars2.githubusercontent.com/u/1488603?v=4","gravatar_id":"","url":"https://api.github.com/users/netixx","html_url":"https://github.com/netixx","followers_url":"https://api.github.com/users/netixx/followers","following_url":"https://api.github.com/users/netixx/following{/other_user}","gists_url":"https://api.github.com/users/netixx/gists{/gist_id}","starred_url":"https://api.github.com/users/netixx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/netixx/subscriptions","organizations_url":"https://api.github.com/users/netixx/orgs","repos_url":"https://api.github.com/users/netixx/repos","events_url":"https://api.github.com/users/netixx/events{/privacy}","received_events_url":"https://api.github.com/users/netixx/received_events","type":"User","site_admin":false},"repo":{"id":91775025,"name":"nixpkgs","full_name":"netixx/nixpkgs","owner":{"login":"netixx","id":1488603,"avatar_url":"https://avatars2.githubusercontent.com/u/1488603?v=4","gravatar_id":"","url":"https://api.github.com/users/netixx","html_url":"https://github.com/netixx","followers_url":"https://api.github.com/users/netixx/followers","following_url":"https://api.github.com/users/netixx/following{/other_user}","gists_url":"https://api.github.com/users/netixx/gists{/gist_id}","starred_url":"https://api.github.com/users/netixx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/netixx/subscriptions","organizations_url":"https://api.github.com/users/netixx/orgs","repos_url":"https://api.github.com/users/netixx/repos","events_url":"https://api.github.com/users/netixx/events{/privacy}","received_events_url":"https://api.github.com/users/netixx/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/netixx/nixpkgs","description":"Nix Packages collection","fork":true,"url":"https://api.github.com/repos/netixx/nixpkgs","forks_url":"https://api.github.com/repos/netixx/nixpkgs/forks","keys_url":"https://api.github.com/repos/netixx/nixpkgs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/netixx/nixpkgs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/netixx/nixpkgs/teams","hooks_url":"https://api.github.com/repos/netixx/nixpkgs/hooks","issue_events_url":"https://api.github.com/repos/netixx/nixpkgs/issues/events{/number}","events_url":"https://api.github.com/repos/netixx/nixpkgs/events","assignees_url":"https://api.github.com/repos/netixx/nixpkgs/assignees{/user}","branches_url":"https://api.github.com/repos/netixx/nixpkgs/branches{/branch}","tags_url":"https://api.github.com/repos/netixx/nixpkgs/tags","blobs_url":"https://api.github.com/repos/netixx/nixpkgs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/netixx/nixpkgs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/netixx/nixpkgs/git/refs{/sha}","trees_url":"https://api.github.com/repos/netixx/nixpkgs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/netixx/nixpkgs/statuses/{sha}","languages_url":"https://api.github.com/repos/netixx/nixpkgs/languages","stargazers_url":"https://api.github.com/repos/netixx/nixpkgs/stargazers","contributors_url":"https://api.github.com/repos/netixx/nixpkgs/contributors","subscribers_url":"https://api.github.com/repos/netixx/nixpkgs/subscribers","subscription_url":"https://api.github.com/repos/netixx/nixpkgs/subscription","commits_url":"https://api.github.com/repos/netixx/nixpkgs/commits{/sha}","git_commits_url":"https://api.github.com/repos/netixx/nixpkgs/git/commits{/sha}","comments_url":"https://api.github.com/repos/netixx/nixpkgs/comments{/number}","issue_comment_url":"https://api.github.com/repos/netixx/nixpkgs/issues/comments{/number}","contents_url":"https://api.github.com/repos/netixx/nixpkgs/contents/{+path}","compare_url":"https://api.github.com/repos/netixx/nixpkgs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/netixx/nixpkgs/merges","archive_url":"https://api.github.com/repos/netixx/nixpkgs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/netixx/nixpkgs/downloads","issues_url":"https://api.github.com/repos/netixx/nixpkgs/issues{/number}","pulls_url":"https://api.github.com/repos/netixx/nixpkgs/pulls{/number}","milestones_url":"https://api.github.com/repos/netixx/nixpkgs/milestones{/number}","notifications_url":"https://api.github.com/repos/netixx/nixpkgs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/netixx/nixpkgs/labels{/name}","releases_url":"https://api.github.com/repos/netixx/nixpkgs/releases{/id}","deployments_url":"https://api.github.com/repos/netixx/nixpkgs/deployments","created_at":"2017-05-19T06:51:56Z","updated_at":"2017-05-19T06:52:23Z","pushed_at":"2018-02-04T10:34:27Z","git_url":"git://github.com/netixx/nixpkgs.git","ssh_url":"git@github.com:netixx/nixpkgs.git","clone_url":"https://github.com/netixx/nixpkgs.git","svn_url":"https://github.com/netixx/nixpkgs","homepage":null,"size":690787,"stargazers_count":0,"watchers_count":0,"language":"Nix","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"NixOS:master","ref":"master","sha":"af884f5607e90b898e66fe9d5e74252bdbdaf0a6","user":{"login":"NixOS","id":487568,"avatar_url":"https://avatars3.githubusercontent.com/u/487568?v=4","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://avatars3.githubusercontent.com/u/487568?v=4","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":"2018-02-03T08:59:38Z","pushed_at":"2018-02-04T10:46:19Z","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":720861,"stargazers_count":2186,"watchers_count":2186,"language":"Nix","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2533,"mirror_url":null,"archived":false,"open_issues_count":2869,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":2533,"open_issues":2869,"watchers":2186,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/NixOS/nixpkgs/pulls/34587"},"html":{"href":"https://github.com/NixOS/nixpkgs/pull/34587"},"issue":{"href":"https://api.github.com/repos/NixOS/nixpkgs/issues/34587"},"comments":{"href":"https://api.github.com/repos/NixOS/nixpkgs/issues/34587/comments"},"review_comments":{"href":"https://api.github.com/repos/NixOS/nixpkgs/pulls/34587/comments"},"review_comment":{"href":"https://api.github.com/repos/NixOS/nixpkgs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/NixOS/nixpkgs/pulls/34587/commits"},"statuses":{"href":"https://api.github.com/repos/NixOS/nixpkgs/statuses/856d7bb0a78e48381933657e67c7e850a0681f40"}},"author_association":"NONE"}}
{"actor":{"display_login":"dotlambda"}}