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

sd-image: don't use installer.cloneConfig option that is not imported #67895

Merged
merged 1 commit into from Sep 2, 2019

Conversation

lopsided98
Copy link
Contributor

Motivation for this change

sd-image.nix does not import clone-config.nix, so the installer.cloneConfig option does not exist when sd-image.nix is imported on its own. The ability to do that is very useful for creating SD images for arbitrary NixOS configurations, rather than a generic installer image. Here is how I use this capability: https://github.com/lopsided98/nixos-config/blob/master/modules/local/machine/raspberry-pi.nix

In the future, we might want to create a installer-sd-image.nix that imports installation-device.nix and sets cloneConfig, but for now I just moved the cloneConfig setting to each SD image module.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • 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 @flokli @samueldr

This once again allows sd-image.nix to imported standalone to build SD images
of arbitrary NixOS systems.
Copy link
Member

@samueldr samueldr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified the image built. Which would have been surprising if it didn't.

@samueldr samueldr merged commit 8a530a0 into NixOS:master Sep 2, 2019
@lopsided98 lopsided98 deleted the sd-image-clone-config branch September 2, 2019 02:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants