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

specialisation: replace nesting with named configurations #81848

Merged
merged 1 commit into from Apr 12, 2020

Conversation

grahamc
Copy link
Member

@grahamc grahamc commented Mar 5, 2020

nested configurations are pretty neat! But then they do this weird thing where they just get enumerated ... and that is super strange. I think adding specialisation with named configurations makes this feature very powerful and accessible.

Things done
  • 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.

Copy link
Contributor

@andrew-d andrew-d left a comment

Choose a reason for hiding this comment

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

Named configurations would be great! I currently do something like this with system.extraSystemBuilderCmds = "echo NAME > $out/child-description", but this is way nicer.

nixos/doc/manual/release-notes/rl-2009.xml Show resolved Hide resolved
@worldofpeace
Copy link
Contributor

Rebase? I would totally finish this or do whatever to get it merged.

@worldofpeace
Copy link
Contributor

conflict is this #81241

@worldofpeace
Copy link
Contributor

@grahamc I did @andrew-d request, rebased, and sparkled ✨ the note slightly with links to options.

@worldofpeace
Copy link
Contributor

@GrahamcOfBorg test specialisation

@worldofpeace
Copy link
Contributor

It seems we have conflicting spellings for specialization or specialisation https://ell.stackexchange.com/questions/129226/what-is-the-difference-between-specialization-and-specialisation. When adding to the note I found myself tying specialization.

@worldofpeace
Copy link
Contributor

@GrahamcOfBorg test specialisation

(turns out the test was actually spelled the other way 😁 )

@worldofpeace
Copy link
Contributor

@GrahamcOfBorg test acme caddy nginx-etag nginx

Co-authored-by: worldofpeace <worldofpeace@protonmail.ch>
@grahamc
Copy link
Member Author

grahamc commented Apr 12, 2020

@GrahamcOfBorg test specialisation
@GrahamcOfBorg test acme caddy
@GrahamcOfBorg test nginx-etag nginx

@grahamc grahamc merged commit 35d8514 into NixOS:master Apr 12, 2020
@worldofpeace
Copy link
Contributor

💖 Love this.

@emilazy emilazy mentioned this pull request Apr 19, 2020
10 tasks
@leo60228
Copy link
Member

leo60228 commented Jul 8, 2020

I'm not sure how feasible this is to implement, but it'd be very useful if nixos-rebuild switch kept the current specialization. Currently, I have to do nixos-rebuild boot and then manually switch.

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

5 participants