Combined Manager provides a new structure for personal NixOS configurations.
This is a very new project, and so any kind of feedback is welcome!
No separation
Combined Manager’s main feature is to break separation. If you want, you should be able to keep everything in a single module.
Most NixOS configuration structures are designed to separate related things into multiple files.
Most prominent separations:
Dividing modules into system and home categories. These categories are then further maintained in separate files.
All flake inputs must be in the same file in flake.nix.
Combined Manager breaks this pattern by allowing modules to add inputs, overlays and Home Manager and Nixpkgs options as if they are simple options.
From the README I’m wondering if there is a possibility to apply combined-manager to just a nixos module (e.g. hyprland) but keep the rest of my configuration outside of combined-manager to e.g. work around the 1 user per system limitation ?
are you certain a patch is necessary (not sure I fully understand your code yet)? I have, many times before, just passed in flake inputs via the extraSpecialArgs option to the eval-config.nix function.
The nix patch I think is because the flake inputs are set based on information passed to combined-manager, so you need to get around the fact that nix doesn’t allow complex evaluations outside of outputs in a flake.
As @Pacman99 said, Nix does not normally allow evaluating inputs in flake.nix. This makes it impossible for combined-manager to allow inputs to be added in files other than flake.nix.
I guess I’m just not clear what you mean by “files” exactly in this context. I mean I know what a file is, but to Nix a file is just another Nix expression that can be imported and evaluated so I’m not understanding why you can’t just pass inputs around.
Obviously there is the module boundary and most people typically do one module per file, so that’s where my brain went. I know there is no computation allowed on flake inputs so I guess I’m just trying to figure out how you are computing inputs and why that is necessary.
Just like you said, nix will not evaluate anything in the inputs attribute of flake.nix. This is why the patch is needed, to allow that attribute to be evaluable and have the ability to separate it into multiple files(or modules). This way you can Add inputs in files other than flake.nix (not possible in vanilla Nix).
If you’re asking why make it possible to add inputs in files other than flake.nix: This is part of the main point of this structure, to separate as much as possible into its own modules. Having all the inputs in the same file is the opposite of that.
I’m not understanding why you can’t just pass inputs around.
I don’t see how this is a solution to Adding more inputs in different files other than flake.nix. I can’t just pass “inputs”(I am guessing you mean the result of the inputs you get in output?) to different modules through extraSpecialArgs and expect it to work.
My guess is that you are confusing between using the result of inputs and Adding more inputs.
If you think I misunderstood what you mean please let me know and elaborate.