docs(nix): use real flake namespace example

This commit is contained in:
2026-08-28 11:12:46 -04:00
parent 64d22473c3
commit d43452a8d3

View File

@@ -16,17 +16,29 @@ Use `flake.mk<Name>` for assembly functions passed through module arguments.
Avoid: Avoid:
```nix ```nix
{ specialArgs = {
lib = projectFunctions; lib = flakeLib;
} };
``` ```
Use: Use:
```nix
specialArgs = {
inherit flake;
};
```
Then call project functions through `flake` inside modules:
```nix ```nix
{ {
lib = nixpkgs.lib; flake,
flake.lib = projectFunctions; lib,
...
}:
{
networking.networkmanager.unmanaged = [ "interface-name:${flake.lib.bridgeName 10}" ];
} }
``` ```