-
Notifications
You must be signed in to change notification settings - Fork 21
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
Is there a way to specify different nixpkgs for different hosts? #51
Comments
@akavel Just wanted to leave a note saying that I'd be happy to satisfy this use case. In fact, I'd need it for myself as well. Just not sure what the best approach is. There is |
@srid I'm afraid both flake-parts and nixos-flake keep being super confusing to me, and it looks like I still have hard time wrapping my head around either 😓 so I only wish I could suggest some solution... The only thing I can try to say is somewhat naively from user perspective; as such, looking e.g. at https://github.com/srid/nixos-config/blob/f1e560296d62c192c6a1a1dd1ca54c237a2cbf96/flake.nix, personally the first idea that comes to my mind, is I'd love if I could e.g. replace line 97-98: self.nixos-flake.lib.mkLinuxSystem
./systems/ax41.nix; with something like: self.nixos-flake.lib.mkLinuxSystemWith { nixpkgs = inputs.nixpkgs2; }
./systems/ax41.nix; |
One approach we could adopt is to totally separate out the flakes. Each host gets its own |
Yup, I am able to get this working! Part of that work involves #54 I will document it all at the end. |
Currently, I am trying to track nixpkgs versions separately for different hosts. My old
flake.nix
had the following:I'm trying to port this config to nixos-flake, to let me unify it with my home-manager configs. However, I noticed that nixos-flake seems to be hardcoded to use
inputs.nixpkgs
, and inputs are passed viaflake-parts.lib.mkFlake { inherit inputs; }
, so I don't see a clear way to use different nixpkgs between differentnixosConfigurations
inside nixos-flake. Do you have any suggestions how I could try doing this? I am ok to try modifying nixos-flake code, but I'd be grateful for suggestions how to try approaching that in such case; currently flake-parts is still quite confusing to me; and also you know nixos-flake better, so may have better ideas what approach could be better suited to it.The text was updated successfully, but these errors were encountered: