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/sd-image-aarch64-base: extracted from sd-image-aarch64 #108880

Closed
wants to merge 1 commit into from

Conversation

urbas
Copy link
Contributor

@urbas urbas commented Jan 9, 2021

This is a backwards-compatible change. It extracts a chunk from the sd-image-aarch64.nix expression and moves it into sd-image-aarch64-base.nix (without modifications).

The new sd-image-aarch64-base module does not import "base", and "installable device" profiles. The image is therefore smaller and does not contain passwordless root logins.

Motivation for this change

The ability to build a minimal image that can be used directly (avoiding the base profile or the installation device profile).

Without this change, you have to create a local copy of the sd-image-aarch64.nix expression (to remove the base profile and installation device profile from imports).

Things done

I built and successfully ran images on Raspberry Pi 3 and Raspberry Pi 4 (with a bunch of services, like prometheus and grafana running on them without a problem).

  • 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 nixpkgs-review --run "nixpkgs-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.

The new `sd-image-aarch64-base` module does not import "base", and "installable device" profiles. The image is therefore smaller and does not contain passwordless root logins.
@flokli
Copy link
Contributor

flokli commented Jan 12, 2021

Strictly speaking, all the RaspberryPi-related stuff doesn't belong into a "base image" either.

I think this should become more composable, but I'm not sure about the proper interface for this. @samueldr, any thoughts?

@urbas
Copy link
Contributor Author

urbas commented Jan 15, 2021

Might be a good time to clean RPi-related expressions up a bit. I'll try to find smaller ways to clean up step by step (with a hope to learn more about RPi expressions in the process). @flokli @samueldr: any pointers would be super welcome 😅

In the meantime I'll close this PR.

@urbas urbas closed this Jan 15, 2021
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

2 participants