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:
```nix
{
lib = projectFunctions;
}
specialArgs = {
lib = flakeLib;
};
```
Use:
```nix
specialArgs = {
inherit flake;
};
```
Then call project functions through `flake` inside modules:
```nix
{
lib = nixpkgs.lib;
flake.lib = projectFunctions;
flake,
lib,
...
}:
{
networking.networkmanager.unmanaged = [ "interface-name:${flake.lib.bridgeName 10}" ];
}
```