-
-
Notifications
You must be signed in to change notification settings - Fork 14.5k
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
lib: add forSystems #171864
lib: add forSystems #171864
Conversation
@alyssais Currently all of our https://github.com/NixOS/templates contain the following boiler plate:
But if we merge this, we would be able to reduce it to this:
|
bdb4333
to
bdaa02c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As mentioned on Matrix, I do not think it add value either.
In your examples, you can just use nixpkgs.legacyPackages
directly. And I would say most of the time, you will actually want to pass extra arguments to nixpkgs
, and in that case you would be instantiating Nixpkgs twice (first in legacyPackages
just to get path
, and then in your function).
Also see #123117, #124866, #155709, #171235. We probably want to stabilize an API first.
4b968d0
to
c8956b2
Compare
Co-authored-by: Justin Restivo <justin@restivo.me>
c8956b2
to
9fb3636
Compare
With the same motivation as #173093 (comment) I'm closing this. |
Description of changes
This adds a function
lib.forSystems
which is similar toforAllSystems
from the c-hello flake templateCo-authored-by: Justin Restivo justin@restivo.me
Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)nixos/doc/manual/md-to-db.sh
to update generated release notes