feat(configs): Pass flake to nixosSystem and darwinSystem
This commit is contained in:
parent
25cb9a6ff8
commit
16d4a9e9d1
1 changed files with 9 additions and 2 deletions
|
@ -28,7 +28,10 @@ let
|
||||||
name: value:
|
name: value:
|
||||||
if class == "nixos" then
|
if class == "nixos" then
|
||||||
nixosSystem {
|
nixosSystem {
|
||||||
specialArgs.hostName = name;
|
specialArgs = {
|
||||||
|
inherit (config.flake) self;
|
||||||
|
hostName = name;
|
||||||
|
};
|
||||||
modules = [
|
modules = [
|
||||||
cfg.modules.nixos.default
|
cfg.modules.nixos.default
|
||||||
inputs.home-manager.nixosModules.home-manager
|
inputs.home-manager.nixosModules.home-manager
|
||||||
|
@ -38,11 +41,15 @@ let
|
||||||
}
|
}
|
||||||
else if class == "darwin" then
|
else if class == "darwin" then
|
||||||
darwinSystem {
|
darwinSystem {
|
||||||
specialArgs = { inherit (config.flake) self; };
|
specialArgs = {
|
||||||
|
inherit (config.flake) self;
|
||||||
|
hostName = name;
|
||||||
|
};
|
||||||
modules = [
|
modules = [
|
||||||
cfg.modules.darwin.default
|
cfg.modules.darwin.default
|
||||||
inputs.home-manager.darwinModules.home-manager
|
inputs.home-manager.darwinModules.home-manager
|
||||||
{ home-manager = globalCfg name value; }
|
{ home-manager = globalCfg name value; }
|
||||||
|
(value.extraCfg or { })
|
||||||
] ++ optional value.graphical cfg.modules.darwin.graphical;
|
] ++ optional value.graphical cfg.modules.darwin.graphical;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue