···222223#### Parameterized Providers
224225-Providers can be implemented as curried functions, allowing you to create parameterized modules. All arguments must be explicitly named. This is useful for creating reusable configurations that can be customized at the inclusion site.
226227-For a real-world example, see how `vic/den` [defines](https://github.com/vic/den/blob/main/nix/aspects.nix) `flake.aspects.default.host` and its [usage](https://github.com/vic/den/blob/main/templates/default/modules/_example/aspects.nix).
228229```nix
230flake.aspects = { aspects, ... }: {
231 system = {
232 nixos.system.stateVersion = "25.11";
233- provides.user = { userName }: { aspect-chain, class }: {
234 darwin.system.primaryUser = userName;
235 nixos.users.${userName}.isNormalUser = true;
236 };
···238239 home-server.includes = [
240 aspects.system
241- (aspects.system.provides.user { userName = "bob"; })
242 ];
243}
244```
···222223#### Parameterized Providers
224225+Providers can be implemented as curried functions, allowing you to create parameterized modules. This is useful for creating reusable configurations that can be customized at the inclusion site.
226227+For real-world examples, see how `vic/den` defines [auto-imports](https://github.com/vic/den/blob/main/modules/aspects/batteries/import-tree.nix) and [home-managed](https://github.com/vic/den/blob/main/modules/aspects/batteries/home-managed.nix) parametric aspects.
228229```nix
230flake.aspects = { aspects, ... }: {
231 system = {
232 nixos.system.stateVersion = "25.11";
233+ provides.user = userName: {
234 darwin.system.primaryUser = userName;
235 nixos.users.${userName}.isNormalUser = true;
236 };
···238239 home-server.includes = [
240 aspects.system
241+ (aspects.system.provides.user "bob")
242 ];
243}
244```