{"action":"closed","number":15096,"pull_request":{"url":"https://api.github.com/repos/NixOS/nixpkgs/pulls/15096","id":68457862,"html_url":"https://github.com/NixOS/nixpkgs/pull/15096","diff_url":"https://github.com/NixOS/nixpkgs/pull/15096.diff","patch_url":"https://github.com/NixOS/nixpkgs/pull/15096.patch","issue_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/15096","number":15096,"state":"closed","locked":false,"title":"[WIP] display/desktop managers: change enable to enums","user":{"login":"ericsagnes","id":367880,"avatar_url":"https://avatars.githubusercontent.com/u/367880?v=3","gravatar_id":"","url":"https://api.github.com/users/ericsagnes","html_url":"https://github.com/ericsagnes","followers_url":"https://api.github.com/users/ericsagnes/followers","following_url":"https://api.github.com/users/ericsagnes/following{/other_user}","gists_url":"https://api.github.com/users/ericsagnes/gists{/gist_id}","starred_url":"https://api.github.com/users/ericsagnes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ericsagnes/subscriptions","organizations_url":"https://api.github.com/users/ericsagnes/orgs","repos_url":"https://api.github.com/users/ericsagnes/repos","events_url":"https://api.github.com/users/ericsagnes/events{/privacy}","received_events_url":"https://api.github.com/users/ericsagnes/received_events","type":"User","site_admin":false},"body":"Work in progress\r\n\r\nExample of what would it be to turn related `foo.enable` options in one `enum` option.\r\n\r\nThe code is just for demonstration purpose and not supposed to work or do anything else than breaking configurations at current time.\r\nI just would like to gather feedback on this approach before doing a real implementation or abandoning it.\r\n\r\nFor example now to enable `kde4` there is 3 settings to change:\r\n\r\n```\r\nservices.xserver.enable = true;\r\nservices.xserver.displayManager.kdm.enable = true;\r\nservices.xserver.desktopManager.kde4.enable = true;\r\n```\r\n\r\nand as each `desktopManager` options are unrelated it is possible to do things like:\r\n\r\n```\r\nservices.xserver.desktopManager.kde4.enable = true;\r\nservices.xserver.desktopManager.xfce.enable = true;\r\n```\r\n\r\nWith this approach we can enable a desktop manager in one option:\r\n\r\n```\r\nservices.xserver.desktopManager.enabled = \"kde4\";\r\n```\r\n\r\nThe display manager will be set to the one fitting the desktop manager by default, but it is also possible to explicitly set one:\r\n\r\n```\r\nservices.xserver.desktopManager.enabled = \"kde4\";\r\nservices.xserver.displayManager.enabled = \"lightdm\";\r\n```\r\n","created_at":"2016-04-30T04:28:43Z","updated_at":"2016-08-23T08:28:33Z","closed_at":"2016-08-23T08:28:33Z","merged_at":null,"merge_commit_sha":"d2169b85e4c257f833ded7788823e263cb89da8d","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/NixOS/nixpkgs/pulls/15096/commits","review_comments_url":"https://api.github.com/repos/NixOS/nixpkgs/pulls/15096/comments","review_comment_url":"https://api.github.com/repos/NixOS/nixpkgs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/15096/comments","statuses_url":"https://api.github.com/repos/NixOS/nixpkgs/statuses/3d6c83aab2c11f5c2877b517b2a528e865d37c93","head":{"label":"ericsagnes:fix/dm","ref":"fix/dm","sha":"3d6c83aab2c11f5c2877b517b2a528e865d37c93","user":{"login":"ericsagnes","id":367880,"avatar_url":"https://avatars.githubusercontent.com/u/367880?v=3","gravatar_id":"","url":"https://api.github.com/users/ericsagnes","html_url":"https://github.com/ericsagnes","followers_url":"https://api.github.com/users/ericsagnes/followers","following_url":"https://api.github.com/users/ericsagnes/following{/other_user}","gists_url":"https://api.github.com/users/ericsagnes/gists{/gist_id}","starred_url":"https://api.github.com/users/ericsagnes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ericsagnes/subscriptions","organizations_url":"https://api.github.com/users/ericsagnes/orgs","repos_url":"https://api.github.com/users/ericsagnes/repos","events_url":"https://api.github.com/users/ericsagnes/events{/privacy}","received_events_url":"https://api.github.com/users/ericsagnes/received_events","type":"User","site_admin":false},"repo":{"id":39763321,"name":"nixpkgs","full_name":"ericsagnes/nixpkgs","owner":{"login":"ericsagnes","id":367880,"avatar_url":"https://avatars.githubusercontent.com/u/367880?v=3","gravatar_id":"","url":"https://api.github.com/users/ericsagnes","html_url":"https://github.com/ericsagnes","followers_url":"https://api.github.com/users/ericsagnes/followers","following_url":"https://api.github.com/users/ericsagnes/following{/other_user}","gists_url":"https://api.github.com/users/ericsagnes/gists{/gist_id}","starred_url":"https://api.github.com/users/ericsagnes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ericsagnes/subscriptions","organizations_url":"https://api.github.com/users/ericsagnes/orgs","repos_url":"https://api.github.com/users/ericsagnes/repos","events_url":"https://api.github.com/users/ericsagnes/events{/privacy}","received_events_url":"https://api.github.com/users/ericsagnes/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ericsagnes/nixpkgs","description":"Nix Packages collection","fork":true,"url":"https://api.github.com/repos/ericsagnes/nixpkgs","forks_url":"https://api.github.com/repos/ericsagnes/nixpkgs/forks","keys_url":"https://api.github.com/repos/ericsagnes/nixpkgs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ericsagnes/nixpkgs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ericsagnes/nixpkgs/teams","hooks_url":"https://api.github.com/repos/ericsagnes/nixpkgs/hooks","issue_events_url":"https://api.github.com/repos/ericsagnes/nixpkgs/issues/events{/number}","events_url":"https://api.github.com/repos/ericsagnes/nixpkgs/events","assignees_url":"https://api.github.com/repos/ericsagnes/nixpkgs/assignees{/user}","branches_url":"https://api.github.com/repos/ericsagnes/nixpkgs/branches{/branch}","tags_url":"https://api.github.com/repos/ericsagnes/nixpkgs/tags","blobs_url":"https://api.github.com/repos/ericsagnes/nixpkgs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ericsagnes/nixpkgs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ericsagnes/nixpkgs/git/refs{/sha}","trees_url":"https://api.github.com/repos/ericsagnes/nixpkgs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ericsagnes/nixpkgs/statuses/{sha}","languages_url":"https://api.github.com/repos/ericsagnes/nixpkgs/languages","stargazers_url":"https://api.github.com/repos/ericsagnes/nixpkgs/stargazers","contributors_url":"https://api.github.com/repos/ericsagnes/nixpkgs/contributors","subscribers_url":"https://api.github.com/repos/ericsagnes/nixpkgs/subscribers","subscription_url":"https://api.github.com/repos/ericsagnes/nixpkgs/subscription","commits_url":"https://api.github.com/repos/ericsagnes/nixpkgs/commits{/sha}","git_commits_url":"https://api.github.com/repos/ericsagnes/nixpkgs/git/commits{/sha}","comments_url":"https://api.github.com/repos/ericsagnes/nixpkgs/comments{/number}","issue_comment_url":"https://api.github.com/repos/ericsagnes/nixpkgs/issues/comments{/number}","contents_url":"https://api.github.com/repos/ericsagnes/nixpkgs/contents/{+path}","compare_url":"https://api.github.com/repos/ericsagnes/nixpkgs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ericsagnes/nixpkgs/merges","archive_url":"https://api.github.com/repos/ericsagnes/nixpkgs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ericsagnes/nixpkgs/downloads","issues_url":"https://api.github.com/repos/ericsagnes/nixpkgs/issues{/number}","pulls_url":"https://api.github.com/repos/ericsagnes/nixpkgs/pulls{/number}","milestones_url":"https://api.github.com/repos/ericsagnes/nixpkgs/milestones{/number}","notifications_url":"https://api.github.com/repos/ericsagnes/nixpkgs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ericsagnes/nixpkgs/labels{/name}","releases_url":"https://api.github.com/repos/ericsagnes/nixpkgs/releases{/id}","deployments_url":"https://api.github.com/repos/ericsagnes/nixpkgs/deployments","created_at":"2015-07-27T08:23:03Z","updated_at":"2016-01-14T04:59:23Z","pushed_at":"2016-08-23T04:38:41Z","git_url":"git://github.com/ericsagnes/nixpkgs.git","ssh_url":"git@github.com:ericsagnes/nixpkgs.git","clone_url":"https://github.com/ericsagnes/nixpkgs.git","svn_url":"https://github.com/ericsagnes/nixpkgs","homepage":null,"size":331078,"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":"5a0cde6c19dedd65d34617f48d7433b16862b67d","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-08-22T11:50:54Z","pushed_at":"2016-08-23T08:18:31Z","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":573515,"stargazers_count":1260,"watchers_count":1260,"language":"Nix","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1574,"mirror_url":null,"open_issues_count":1509,"forks":1574,"open_issues":1509,"watchers":1260,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/NixOS/nixpkgs/pulls/15096"},"html":{"href":"https://github.com/NixOS/nixpkgs/pull/15096"},"issue":{"href":"https://api.github.com/repos/NixOS/nixpkgs/issues/15096"},"comments":{"href":"https://api.github.com/repos/NixOS/nixpkgs/issues/15096/comments"},"review_comments":{"href":"https://api.github.com/repos/NixOS/nixpkgs/pulls/15096/comments"},"review_comment":{"href":"https://api.github.com/repos/NixOS/nixpkgs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/NixOS/nixpkgs/pulls/15096/commits"},"statuses":{"href":"https://api.github.com/repos/NixOS/nixpkgs/statuses/3d6c83aab2c11f5c2877b517b2a528e865d37c93"}},"merged":false,"mergeable":false,"mergeable_state":"dirty","merged_by":null,"comments":22,"review_comments":2,"commits":2,"additions":312,"deletions":507,"changed_files":65}}
{"actor":{"display_login":"ericsagnes"}}