Skip to content

Commit 60318ef

Browse files
committed
lib/host, docs/src/hosts/structure: add forgotten homeManagerSystem argument
1 parent a99005c commit 60318ef

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

docs/src/hosts/structure.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## Function Arguments {#function-arguments}
44
- `name`: a string representing the host name.
5+
- `homeManagerSystem`: a string used in the `pkgs` attribute of the `home-manager.lib.homeManagerConfiguration` function, which is used in the [`delib.configurations`](/configurations/introduction) function as `homeManagerNixpkgs.legacyPackages.${homeManagerSystem}`.
56
- `myconfig`: sets its value to `config.${myconfigName}` if `config.${myconfigName}.host` matches the current host.
67
- `nixos`: sets its value to `config` if `isHomeManager` is `false` and `config.${myconfigName}.host` matches the current host.
78
- `home`: sets its value to `config` if `isHomeManager` is `true` and `config.${myconfigName}.host` matches the current host. Otherwise, if `config.${myconfigName}.host` matches the current host, sets its value to `config.home-manager.users.${homeManagerUser}`.
@@ -20,6 +21,9 @@ A list of arguments passed to `?(shared.)[myconfig|nixos|home]` if their type is
2021
delib.host {
2122
name = "";
2223
24+
# homeManagerNixpkgs.legacyPackages.${homeManagerSystem}
25+
homeManagerSystem = "x86_64-linux";
26+
2327
# if config.${myconfigName}.host == name
2428
# then {config.${myConfigName} = ...;}
2529
# else {}

docs/src/ru/hosts/structure.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## Аргументы функции {#function-arguments}
44
- `name`: строка, представляющая имя хоста.
5+
- `homeManagerSystem`: строка, используемая в атрибуте `pkgs` функции `home-manager.lib.homeManagerConfiguration`, которая используется в функции [`delib.configurations`](/ru/configurations/introduction) в виде `homeManagerNixpkgs.legacyPackages.${homeManagerSystem}`.
56
- `myconfig`: устанавливает её значение в `config.${myconfigName}`, если `config.${myconfigName}.host` соответствует текущему хосту.
67
- `nixos`: устанавливает её значение в `config`, если `isHomeManager` равен `false` и `config.${myconfigName}.host` соответствует текущему хосту.
78
- `home`: устанавливает её значение в `config`, если `isHomeManager` равен `true` и `config.${myconfigName}.host` соответствует текущему хосту. В противном случае, если `config.${myconfigName}.host` соответствует текущему хосту, устанавливает её значение в `config.home-manager.users.${homeManagerUser}`.
@@ -21,6 +22,9 @@
2122
delib.host {
2223
name = "";
2324
25+
# homeManagerNixpkgs.legacyPackages.${homeManagerSystem}
26+
homeManagerSystem = "x86_64-linux";
27+
2428
# если config.${myconfigName}.host == name
2529
# то {config.${myConfigName} = ...;}
2630
# иначе {}

lib/host.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
}: {
1010
host = {
1111
name,
12+
homeManagerSystem,
1213
myconfig ? {},
1314
nixos ? {},
1415
home ? {},

0 commit comments

Comments
 (0)