mirror of
https://gitlab.com/rensa-nix/utils.git
synced 2025-12-11 23:20:12 +01:00
docs: document how to integrate home-manager with mkSystem and mkHome
This commit is contained in:
parent
f8f5dbd535
commit
87e0176958
1 changed files with 12 additions and 1 deletions
|
|
@ -4,6 +4,10 @@
|
||||||
|
|
||||||
Wraps a NixOS or `nix-darwin` configuration. Optionally integrates `nix-wsl` (NixOS only), `disko` (NixOS only) and/or `home-manager`.
|
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**:
|
**Example**:
|
||||||
|
|
||||||
```nix title="cells/host/nixos.nix"
|
```nix title="cells/host/nixos.nix"
|
||||||
|
|
@ -12,11 +16,18 @@ Wraps a NixOS or `nix-darwin` configuration. Optionally integrates `nix-wsl` (Ni
|
||||||
in {
|
in {
|
||||||
test = utils.mkSystem {
|
test = utils.mkSystem {
|
||||||
ren = {
|
ren = {
|
||||||
inherit (inputs) pkgs disko;
|
inherit (inputs) pkgs disko home-manager;
|
||||||
};
|
};
|
||||||
|
|
||||||
disko.devices = utils.collectDisks cell.disks;
|
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";
|
system.stateVersion = "25.11";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue