Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nixos/lxd: add package options for LXC, LXD and ZFS #73902

Merged
merged 2 commits into from Jan 30, 2020

Conversation

@pstch
Copy link
Contributor

@pstch pstch commented Nov 22, 2019

Currently, LXD always use pkgs.zfs, even if boot.zfs.enableUnstable is set. This
change provides the option to change the LXC, LXD and ZFS packages, and
determines the default ZFS package based on zfs.enableUnstable.

Motivation for this change

I had to change the LXD package (to use LXD from nixpkgs-unstable), and noticed it could not be changed in virtualisation/lxd.nix. I also noticed that zfs.enableUnstable was not taken into account for the ZFS dependency.

Things done

Added options for the LXC, LXD and ZFS packages in the LXD configuration.

  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
Notify maintainers

cc @

@pstch pstch force-pushed the pstch:feature/lxd-package-config branch 2 times, most recently from 9206978 to 20d5889 Nov 22, 2019
@pstch
Copy link
Contributor Author

@pstch pstch commented Nov 22, 2019

The force-push was to fix some forgotten whitespace.

@nixos-discourse
Copy link

@nixos-discourse nixos-discourse commented Nov 26, 2019

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-ready-for-review-may-2019/3032/85

@pstch pstch force-pushed the pstch:feature/lxd-package-config branch 2 times, most recently from 19cf258 to a6947b6 Dec 6, 2019
@pstch pstch force-pushed the pstch:feature/lxd-package-config branch from a6947b6 to 64dae58 Dec 23, 2019
@pstch
Copy link
Contributor Author

@pstch pstch commented Dec 23, 2019

rebased and adapted to #71978

cc @Lassulus @wucke13

@pstch pstch force-pushed the pstch:feature/lxd-package-config branch from 64dae58 to 690fe66 Dec 23, 2019
Currently, LXD always use pkgs.zfs, even if boot.zfs.enableUnstable is set. This
change provides the option to change the LXC, LXD and ZFS packages, and
determines the default ZFS package based on zfs.enableUnstable.
@pstch pstch force-pushed the pstch:feature/lxd-package-config branch from 690fe66 to 665d863 Dec 23, 2019
@Lassulus
Copy link
Contributor

@Lassulus Lassulus commented Dec 23, 2019

hmm, wouldn't it be better to use packageOverrides for something like this? maybe zfs.enableUnstable should override pkgs.zfs?

@pstch
Copy link
Contributor Author

@pstch pstch commented Dec 27, 2019

Should I remove the ZFS part of this PR so that we can merge the LXC/LXD options and handle ZFS in another PR ?

@Mic92 Mic92 merged commit 8a14852 into NixOS:master Jan 30, 2020
@Mic92
Copy link
Contributor

@Mic92 Mic92 commented Jan 30, 2020

I tried that, but it seems to cause infinite recursions in our nixos modules system.

dtzWill added a commit to dtzWill/nixpkgs that referenced this pull request Jan 30, 2020
nixos/lxd: add package options for LXC, LXD and ZFS

(cherry picked from commit 8a14852)
anna328p added a commit to anna328p/nixpkgs that referenced this pull request Feb 2, 2020
nixos/lxd: add package options for LXC, LXD and ZFS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.