docs: document how to integrate home-manager with mkSystem and mkHome

This commit is contained in:
technofab 2025-10-30 11:27:17 +01:00
parent f8f5dbd535
commit 87e0176958
No known key found for this signature in database

View file

@ -4,6 +4,10 @@
Wraps a NixOS or `nix-darwin` configuration. Optionally integrates `nix-wsl` (NixOS only), `disko` (NixOS only) and/or `home-manager`.
If you want to integrate `disko`, just set `disko.devices` to `utils.collectDisks cell.disks` like below.
If you want to integrate `home-manager`, set the user's config in `home-manager.users.<username>` to the `innerConfig` output of [`mkHome`](#mkHome), like below.
**Example**:
```nix title="cells/host/nixos.nix"
@ -12,11 +16,18 @@ Wraps a NixOS or `nix-darwin` configuration. Optionally integrates `nix-wsl` (Ni
in {
test = utils.mkSystem {
ren = {
inherit (inputs) pkgs disko;
inherit (inputs) pkgs disko home-manager;
};
disko.devices = utils.collectDisks cell.disks;
home-manager = {
useUserPackages = false;
useGlobalPkgs = true;
users."demo" = cell.home."demo@test".innerConfig;
};
# also configure users etc.
system.stateVersion = "25.11";
};
}