{"action":"created","issue":{"url":"https://api.github.com/repos/NixOS/nixpkgs/issues/11533","labels_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/11533/labels{/name}","comments_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/11533/comments","events_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/11533/events","html_url":"https://github.com/NixOS/nixpkgs/issues/11533","id":120837376,"number":11533,"title":"The boot.loader.grub.zfsSupport property is ignored","user":{"login":"msteen","id":788953,"avatar_url":"https://avatars.githubusercontent.com/u/788953?v=3","gravatar_id":"","url":"https://api.github.com/users/msteen","html_url":"https://github.com/msteen","followers_url":"https://api.github.com/users/msteen/followers","following_url":"https://api.github.com/users/msteen/following{/other_user}","gists_url":"https://api.github.com/users/msteen/gists{/gist_id}","starred_url":"https://api.github.com/users/msteen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/msteen/subscriptions","organizations_url":"https://api.github.com/users/msteen/orgs","repos_url":"https://api.github.com/users/msteen/repos","events_url":"https://api.github.com/users/msteen/events{/privacy}","received_events_url":"https://api.github.com/users/msteen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-12-07T18:29:45Z","updated_at":"2015-12-07T19:09:04Z","closed_at":null,"body":"When I updated my nixpkgs repo to the latest version of the 15.09 channel, I saw that zfs-user was being build even though I do not use ZFS. I checked all-packages.nix and grub.nix and found the defaults no longer match the assumptions made in grub.nix.\r\n\r\nCurrently all-packages.nix contains the following:\r\n\r\n    grub2 = grub2_full;\r\n\r\n    grub2_full = callPackage ../tools/misc/grub/2.0x.nix { };\r\n\r\n    grub2_efi = grub2_full.override {\r\n      efiSupport = true;\r\n    };\r\n\r\n    grub2_light = grub2_full.override {\r\n      zfsSupport = false;\r\n    };\r\n\r\nWhile grub.nix still has the following:\r\n\r\n    realGrub = if cfg.version == 1 then pkgs.grub\r\n      else if cfg.zfsSupport then pkgs.grub2.override { zfsSupport = true; }\r\n      else if cfg.enableTrustedBoot then pkgs.trustedGrub\r\n             else pkgs.grub2;\r\n\r\nSince `pkgs.grub2` is defined as `grub2_full`, which has `zfsSupport ? true`, there currently is no difference between `pkgs.grub2.override { zfsSupport = true; }` and `pkgs.grub2`. I do not see the need for `grub_full`, `grub_efi` and `grub_light`. Would it not be better to keep things configurable the way they are using options such as `boot.loader.grub.zfsSupport`?\r\n"},"comment":{"url":"https://api.github.com/repos/NixOS/nixpkgs/issues/comments/162627084","html_url":"https://github.com/NixOS/nixpkgs/issues/11533#issuecomment-162627084","issue_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/11533","id":162627084,"user":{"login":"wkennington","id":1773309,"avatar_url":"https://avatars.githubusercontent.com/u/1773309?v=3","gravatar_id":"","url":"https://api.github.com/users/wkennington","html_url":"https://github.com/wkennington","followers_url":"https://api.github.com/users/wkennington/followers","following_url":"https://api.github.com/users/wkennington/following{/other_user}","gists_url":"https://api.github.com/users/wkennington/gists{/gist_id}","starred_url":"https://api.github.com/users/wkennington/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wkennington/subscriptions","organizations_url":"https://api.github.com/users/wkennington/orgs","repos_url":"https://api.github.com/users/wkennington/repos","events_url":"https://api.github.com/users/wkennington/events{/privacy}","received_events_url":"https://api.github.com/users/wkennington/received_events","type":"User","site_admin":false},"created_at":"2015-12-07T19:09:04Z","updated_at":"2015-12-07T19:09:04Z","body":"That doesn't really make a difference as this function is used not only for\ngrub2_full but also applies to grub2_efi to make sure the efi binaries also\nsupport zfs. This is much cleaner than having a derivation for every single\npermutation listed in the NixOS module.\n\nOn Mon, Dec 7, 2015, 10:58 AM msteen <notifications@github.com> wrote:\n\n> The reason to have those different packages is to have the binaries build\n> for you by Hydra, that answers my question why there are three versions of\n> grub in all-packages.nix, but it does not address the issue. Or I must be\n> misunderstanding something about your first comment. And why not grub2\n> (with zfsSupport ? false) and grub2_zfs, instead of grub_full and\n> grub_light? Should grub.nix not be changed e.g. like this:\n>\n> realGrub = if cfg.version == 1 then pkgs.grub\n>   else if cfg.zfsSupport then pkgs.grub2_full\n>   else if cfg.enableTrustedBoot then pkgs.trustedGrub\n>          else pkgs.grub2_light;\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/NixOS/nixpkgs/issues/11533#issuecomment-162624203>.\n>\n"}}