-
Notifications
You must be signed in to change notification settings - Fork 29
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
Thin nixosSystems #122
Comments
Do you know where |
I believe that starts with There's https://github.com/NixOS/nixpkgs/blob/master/nixos/lib/eval-config-minimal.nix which does not evaluate all the modules by default, but I haven't succeeded in building an actual nixosSystem with that as the modules are currently rather tightly coupled. E.g. I want systemd-resolved for my system, but that module currently checks if That alone would be easy to solve, but as I have no idea how many similar evaluation errors would follow, I did not continue to investigate further. Happy to work on this together during NixCon or Oceansprint if interested people are there! :) One idea would be to start with tooling that calculates the "dependency tree" of modules, not in terms of imports, but in terms of references to |
I've been on a similar quest: https://github.com/arianvp/lolmin/blob/main/flake.nix All the modules that I moved out of nixpkgs into my own repo are problematic ones. Which I then kept deleting lines from until it stopped complaining about dependencies.
Anyhow. Eval went from 6s to 3s which is quite nice. But it shows NixOS needs a lot of refactoring for it to be practically possible to reduce the module list. |
Is your feature request related to a problem? Please describe.
When calling
nixpkgs.lib.nixosSystems
, all the NixOS modules of the repo are getting loaded, making the evaluation quite expensive.Describe the solution you'd like
Provide a compatible function that only loads a subset of the nixpkgs NixOS modules.
Describe alternatives you've considered
Additional context
The text was updated successfully, but these errors were encountered: