Skip to content

Batteries

Den ships reusable aspect providers under den.provides (aliased den._). Each battery contributes NixOS/Darwin/home-manager modules to hosts and users that include them via den.ctx.

Creates OS-level user accounts (users.users.<name>) with isNormalUser, and home directory. Works on NixOS/Darwin/WSL/HomeManager.

Automatically sets the host’s name to the one defined in den.hosts.<name>.hostName. Works on NixOS/Darwin/WSL.

A user class automatically enabled by Den to forward settings into the host’s users.users.<userName>. Forwards work into NixOS/Darwin classes.

Marks a user as the primary user (admin level) of a host. Works in NixOS/Darwin/WSL.

Sets the user’s login shell. users.users.<name>.shell enabling the shell at host, and the home-manager programs.<shell>.enable.

Allows the user and host to contribute configuration to each other via .provides..

Configures TTY auto-login for the primary user via services.getty.autologinUser.

WSL-specific activation. Enables den.ctx.wsl-host when the host.wsl.enable = true and includes NixOS-WSL module.

Forwards aspect configuration from one aspect to another. Used for separation of conncerns. See Custom Classes section.

Provides inputs.import-tree helpers to import trees of non-dendritic legacy modules, like a directory containing only nixos modules.

These only work when the module system is flake-parts’.

Exposes inputs' (system-qualified inputs) into aspect modules. Source: provides/flake-parts/inputs.nix

Exposes self' (system-qualified self outputs) into aspect modules. Source: provides/flake-parts/self.nix

Defines den.ctx.hm-host which activates when at least one user has homeManager classes. The hm-host context can be used to set home-manager.useGlobalPkgs and useUserPackages.

Merges home-manager configuration into the host OS module system. Bridges home-manager.users.<name> with the user’s homeManager class.

Imports the appropriate home-manager module (nixos or darwin).

Integrates hjem as an alternative to home-manager. Imports hjem’s NixOS/Darwin module.

Merges hjem user configuration into the host. Sets hjem.users.<name> from the user’s hjem class.

Integrates maid as an alternative home management system.

Merges maid configuration into the host OS users.users.<name>.maid for each user maid class.

Allows unfree packages by name via nixpkgs.config.allowUnfreePredicate.

Contribute Community Sponsor