Any module can contribute configurations to aspects.
# modules/my-laptop.nix
{ den, inputs, ... }: {
# Example: enhance the my-laptop aspect.
# This can be done from any file, multiple times.
den.aspects.my-laptop = {
# this aspect includes configurations
# available from other aspects
includes = [
# your own parametric aspects
den.aspects.workplace-vpn
# den's opt-in batteries includes.
den.provides.home-manager
];
# any file can contribute to this aspect, so
# best practice is to keep concerns separated,
# each on their own file, instead of having huge
# modules in a single file:
# any NixOS configuration
nixos = {
# A nixos class module, see NixOS options.
# import third-party NixOS modules
imports = [
inputs.disko.nixosModules.disko
];
disko.devices = { /* ... */ };
};
# any nix-darwin configuration
darwin = {
# import third-party Darwin modules
imports = [
inputs.nix-homebrew.darwinModules.nix-homebrew
];
nix-homebrew.enableRosetta = true;
};
# For all users of my-laptop
homeManager.programs.vim.enable = true;
};
}
# modules/vic.nix
{ den, ... }: {
den.aspects.vic = {
homeManager = { /* ... */ };
# User contribs to host
nixos.users.users = {
vic.description = "oeiuwq";
};
includes = [
den.aspects.tiling-wm
den._.primary-user
];
};
}
You are done! You know everything to start creating configurations with den.