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
jtojnar
left a comment
There was a problem hiding this comment.
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.forSystemswhich is similar toforAllSystemsfrom the c-hello flake templateCo-authored-by: Justin Restivo justin@restivo.me
Things done
sandbox = trueset 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.shto update generated release notes