Structure
Function Arguments
myconfigName(string): the category for all Denix module options, hosts, and rices. Defaults tomyconfig; changes are not recommended.denixLibName(string): the name of the Denix library inspecialArgs({denixLibName, ...}: denixLibName.module { ... }). Defaults todelib; changes are not recommended.extensions(listOf delib.extension): a list of extensions to be applied to the configuration. Defaults to[].nixpkgs(nixpkgs): used to override nixpkgs in your configuration, equivalent toinputs.denix.inputs.nixpkgs.follows. Defaults toinputs.nixpkgs.home-manager(home-manager): used to override home-manager in your configuration, equivalent toinputs.denix.inputs.home-manager.follows. Defaults toinputs.home-manager.nix-darwin(nix-darwin): used to override nix-darwin in your configuration, equivalent toinputs.denix.inputs.nix-darwin.follows. Defaults toinputs.nix-darwin.homeManagerNixpkgs(nixpkgs): used in thepkgsattribute of thehome-manager.lib.homeManagerConfigurationfunction in the format:homeManagerNixpkgs.legacyPackages.${host :: homeManagerSystem}. Defaults to thenixpkgsprovided in the function arguments.useHomeManagerModule(boolean): whether to include the Home Manager module in the NixOS and Nix-Darwin configurations. Defaults totrue; can be overridden per host viadelib.host :: useHomeManagerModule.homeManagerUser(string): the username, used inhome-manager.users.${homeManagerUser}and for generating the Home Manager configuration list. Can be overridden per host viadelib.host :: homeManagerUser.moduleSystem("nixos", "home", and "darwin"): specifies which module system the configuration list should be generated for - NixOS, Home Manager, or Nix-Darwin.paths(listOf string): paths to be imported; add hosts, rices, and modules here. Defaults to[].exclude(listOf string): paths to be excluded from importing. Defaults to[].recursive(boolean): determines whether to recursively search for paths to import. Defaults totrue.specialArgs(attrset):specialArgsto be passed tolib.nixosSystem,home-manager.lib.homeManagerConfiguration, andnix-darwin.lib.darwinSystem. Defaults to{}.- EXPERIMENTAL
extraModules(list): defaults to[]. - EXPERIMENTAL
mkConfigurationsSystemExtraModule(attrset): a module used in the internal NixOS configuration that receives the list of hosts and rices to generate the configuration list. Defaults to{nixpkgs.hostPlatform = "x86_64-linux";}.
Pseudocode
nix
delib.configurations rec {
myconfigName = "myconfig";
denixLibName = "delib";
extensions = with delib.extensions; [];
nixpkgs = inputs.nixpkgs;
home-manager = inputs.home-manager;
nix-darwin = inputs.nix-darwin;
homeManagerNixpkgs = nixpkgs;
useHomeManagerModule = true;
homeManagerUser = "sjohn";
moduleSystem = "nixos";
paths = [./modules ./hosts ./rices];
exclude = [./modules/deprecated];
recursive = true;
specialArgs = {
inherit inputs;
};
}