-
-
Notifications
You must be signed in to change notification settings - Fork 334
flake: add overridable systems
input
#3311
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
Conversation
systems
input
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.
I always find it weird to rely on an extra repo for this.
But anyways, I think this is a good idea and gives extra flexibility to the users, so let's have it :)
We don't have to. We could use Using an external repo is just a minor convenience, in that we don't need our own list of systems. Also, if we use nix 2.26+ to create a lockfile with a relative-path input, then that lockfile isn't backwards compatible with nix <2.26. As for needing an extra input; that's a design limitation with flakes. The way flakes deal with "systems" is one of the major flaws pointed out by those who want to make breaking changes to the "experimental" flakes design. Let's not dig up that can of worms here! 🥫 |
Without edolstra/flake-compat#71, we kinda do need to use an external input. Using a relative path input will break flake-compat. In my personal config, I worked around this by using edolstra/flake-compat#71 as my |
Users can specify which systems to use by having our `systems` input follow a different file or flake: ```nix { inputs = { # Here we list systems in a local file inputs.systems.url = "path:./systems.nix"; inputs.systems.flake = false; inputs.nixvim.url = "github:nix-community/nixvim"; # Here we override the list of systems with only our own inputs.nixvim.inputs.systems.follows = "systems"; # ... }; outputs = inputs: { # ... }; } ``` Alternatively, instead of users listing systems in a local file, they can use an external flake, e.g.: - github:nix-systems/default - Exposes aarch64 and x86_64 for linux and darwin - github:nix-systems/default-linux - Exposes aarch64 and x86_64 for linux - github:nix-systems/default-darwin - Exposes aarch64 and x86_64 for darwin - github:nix-systems/aarch64-darwin - github:nix-systems/aarch64-linux - github:nix-systems/x86_64-darwin - github:nix-systems/x86_64-linux See https://github.com/nix-systems/nix-systems
b68e1a5
to
3212791
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This pull request, with head sha This pull request will be automatically closed by GitHub.As soon as GitHub detects that the sha It is possible for this pull request to remain open if this detection does not happen, this usually happens when a force-push is done on this branch |
Thanks for the clarification @MattSturgeon :) |
Users can specify which systems to use by having our
systems
input follow a different file or flake:Alternatively, instead of users listing systems in a local file, they
can use an external flake, e.g.:
github:nix-systems/default
github:nix-systems/default-linux
github:nix-systems/default-darwin
github:nix-systems/aarch64-darwin
github:nix-systems/aarch64-linux
github:nix-systems/x86_64-darwin
github:nix-systems/x86_64-linux
See https://github.com/nix-systems/nix-systems