{"action":"created","issue":{"url":"https://api.github.com/repos/NixOS/nixpkgs/issues/42793","repository_url":"https://api.github.com/repos/NixOS/nixpkgs","labels_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/42793/labels{/name}","comments_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/42793/comments","events_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/42793/events","html_url":"https://github.com/NixOS/nixpkgs/pull/42793","id":337163880,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk4NDQ0OTQ0","number":42793,"title":"nixos/grub: light grub by default, 150MB closure size reduction","user":{"login":"Infinisil","id":20525370,"node_id":"MDQ6VXNlcjIwNTI1Mzcw","avatar_url":"https://avatars0.githubusercontent.com/u/20525370?v=4","gravatar_id":"","url":"https://api.github.com/users/Infinisil","html_url":"https://github.com/Infinisil","followers_url":"https://api.github.com/users/Infinisil/followers","following_url":"https://api.github.com/users/Infinisil/following{/other_user}","gists_url":"https://api.github.com/users/Infinisil/gists{/gist_id}","starred_url":"https://api.github.com/users/Infinisil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Infinisil/subscriptions","organizations_url":"https://api.github.com/users/Infinisil/orgs","repos_url":"https://api.github.com/users/Infinisil/repos","events_url":"https://api.github.com/users/Infinisil/events{/privacy}","received_events_url":"https://api.github.com/users/Infinisil/received_events","type":"User","site_admin":false},"labels":[{"id":737642262,"node_id":"MDU6TGFiZWw3Mzc2NDIyNjI=","url":"https://api.github.com/repos/NixOS/nixpkgs/labels/10.rebuild-darwin:%200","name":"10.rebuild-darwin: 0","color":"eeffee","default":false},{"id":737642408,"node_id":"MDU6TGFiZWw3Mzc2NDI0MDg=","url":"https://api.github.com/repos/NixOS/nixpkgs/labels/10.rebuild-linux:%200","name":"10.rebuild-linux: 0","color":"eeffee","default":false},{"id":60265212,"node_id":"MDU6TGFiZWw2MDI2NTIxMg==","url":"https://api.github.com/repos/NixOS/nixpkgs/labels/6.topic:%20nixos","name":"6.topic: nixos","color":"fef2c0","default":false},{"id":290122884,"node_id":"MDU6TGFiZWwyOTAxMjI4ODQ=","url":"https://api.github.com/repos/NixOS/nixpkgs/labels/8.has:%20module%20(update)","name":"8.has: module (update)","color":"009800","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-06-29T23:27:09Z","updated_at":"2018-06-30T00:37:12Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/NixOS/nixpkgs/pulls/42793","html_url":"https://github.com/NixOS/nixpkgs/pull/42793","diff_url":"https://github.com/NixOS/nixpkgs/pull/42793.diff","patch_url":"https://github.com/NixOS/nixpkgs/pull/42793.patch"},"body":"Since the default grub2 package has ZFS enabled and this was the one\r\nthat got used for NixOS and it's not being overridden, every NixOS user\r\ngets the ZFS dependencies, even when they're not using ZFS at all.\r\n\r\nThis PR effectively removes 150MB from the system closure on a default minimal setup. Bringing the closure size for an empty `configuration.nix` from 1049MB to 903MB (tested with `nix path-info -S` of a `nix-build nixos -A config.system.build.toplevel`).\r\n\r\n#### Can it break anything?\r\nThis switches `grub2` for `grub2_minimal` for NixOS. Since the latter is being defined like this https://github.com/NixOS/nixpkgs/blob/ad112ca0a48a25ba760a616a5eb18b85e0a82559/pkgs/top-level/all-packages.nix#L2833-L2835\r\n\r\nand it's being overridden with `zfsSupport = true` when a ZFS filesystem is being used\r\nhttps://github.com/NixOS/nixpkgs/blob/ad112ca0a48a25ba760a616a5eb18b85e0a82559/nixos/modules/system/boot/loader/grub/grub.nix#L12\r\n(`grub2_light` for this PR), this can only break systems who relied on ZFS support using NixOS' non-fixed grub derivation propagated through here https://github.com/NixOS/nixpkgs/blob/ad112ca0a48a25ba760a616a5eb18b85e0a82559/nixos/modules/system/boot/loader/grub/grub.nix#L561-L567\r\n\r\nPing @aszlig @symphorien\r\n\r\n###### Things done\r\n\r\nI ran the NixOS test `installer.zfsroot` successfully. Also tried to run `installer.simpleUefiGrub`, but it failed for [some unrelated networking issue](https://gist.github.com/Infinisil/a20ff95ac0f7f436b178ae520f9a74f7).\r\n\r\n<!-- Please check what applies. Note that these are not hard requirements but merely serve as information for reviewers. -->\r\n\r\n- [x] Tested using sandboxing ([nix.useSandbox](http://nixos.org/nixos/manual/options.html#opt-nix.useSandbox) on NixOS, or option `sandbox` in [`nix.conf`](http://nixos.org/nix/manual/#sec-conf-file) on non-NixOS)\r\n- Built on platform(s)\r\n   - [x] NixOS\r\n- [x] 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- [x] Determined the impact on package closure size (by running `nix path-info -S` before and after)\r\n- [x] Fits [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/.github/CONTRIBUTING.md).\r\n\r\n---\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/NixOS/nixpkgs/issues/comments/401505008","html_url":"https://github.com/NixOS/nixpkgs/pull/42793#issuecomment-401505008","issue_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/42793","id":401505008,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMTUwNTAwOA==","user":{"login":"aszlig","id":192147,"node_id":"MDQ6VXNlcjE5MjE0Nw==","avatar_url":"https://avatars1.githubusercontent.com/u/192147?v=4","gravatar_id":"","url":"https://api.github.com/users/aszlig","html_url":"https://github.com/aszlig","followers_url":"https://api.github.com/users/aszlig/followers","following_url":"https://api.github.com/users/aszlig/following{/other_user}","gists_url":"https://api.github.com/users/aszlig/gists{/gist_id}","starred_url":"https://api.github.com/users/aszlig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aszlig/subscriptions","organizations_url":"https://api.github.com/users/aszlig/orgs","repos_url":"https://api.github.com/users/aszlig/repos","events_url":"https://api.github.com/users/aszlig/events{/privacy}","received_events_url":"https://api.github.com/users/aszlig/received_events","type":"User","site_admin":false},"created_at":"2018-06-30T00:37:12Z","updated_at":"2018-06-30T00:37:12Z","author_association":"MEMBER","body":"@Infinisil: I didn't run any tests, but it seems you did:\r\n\r\n> I ran the NixOS test installer.zfsroot successfully. Also tried to run installer.simpleUefiGrub, but it failed for some unrelated networking issue."}}
{"actor":{"display_login":"aszlig"}}