Flakes - NixOS Wiki is somehow quite different than nix-flakes.md · GitHub. The later is an initial draft that got changed a lot and now the correct function name is output not provides?
# Default module, for use in dependent flakes
nixosModule = { config }: { options = {}; config = {}; };
# Same idea as nixosModule but a list or attrset of them.
nixosModules = {};
Stupid question, let’s say I have a directory modules with a.nix, b.nix and c.nix and a default.nix that just has:
imports = [ ./a.nix ./b.nix ./c.nix ];
What do I have put to nixosModules to “export” those 3 different nix modules - I suppose I need to map import over the contents of (import modules/default.nix).imports or something? Or perhaps use builtins.readDir somehow?
Yeah, but I want to have one git repo with a few different modules one could choose from (not one module consisting of “submodules”). Now I did something like: