-
Notifications
You must be signed in to change notification settings - Fork 155
flake.nix: refactor #1374
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
base: master
Are you sure you want to change the base?
flake.nix: refactor #1374
Conversation
format the flake using alejandra
|
@dvtfl Mentioning you because of this comment and me having no clue, if these changes make sense. |
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.
Banger
| pkgsFor = eachSystem (system: | ||
| import nixpkgs { | ||
| localSystem.system = system; | ||
| overlays = [(import rust-overlay)]; |
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.
Nit:
rust-overlay works this way because it contains the default.nix at the repo root. If you want to keep importing it this way, mark the flake input flake = false.
My preference would be to use rust-overlay.overlays.default in this position, and keep the input the way it is.
| }); | ||
| in { | ||
| packages = | ||
| lib.mapAttrs (system: pkgs: let |
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.
Optional, can be changed later:
If you wish to provide an overlay, for users that want to introduce cosmic-comp into pkgs, and build it with their nixpkgs instead of this flake's transitive input, move the package to a file (nix/package.nix) and make a flake output overlays.default = final: prev: { cosmic-comp = final.callPackage "${self}/nix/package.nix" {}; };, then inherit (pkgsFor.${system}) cosmic-comp; default = self.packages.${system}.cosmic-comp; in flake output packages.
Typing on a phone, sorry for errors.
This PR: