feat(configs): Pass flake to nixosSystem and darwinSystem

This commit is contained in:
Mohammad Rafiq 2025-07-14 13:26:44 +08:00
parent 25cb9a6ff8
commit 16d4a9e9d1
No known key found for this signature in database

View file

@ -28,7 +28,10 @@ let
name: value:
if class == "nixos" then
nixosSystem {
specialArgs.hostName = name;
specialArgs = {
inherit (config.flake) self;
hostName = name;
};
modules = [
cfg.modules.nixos.default
inputs.home-manager.nixosModules.home-manager
@ -38,11 +41,15 @@ let
}
else if class == "darwin" then
darwinSystem {
specialArgs = { inherit (config.flake) self; };
specialArgs = {
inherit (config.flake) self;
hostName = name;
};
modules = [
cfg.modules.darwin.default
inputs.home-manager.darwinModules.home-manager
{ home-manager = globalCfg name value; }
(value.extraCfg or { })
] ++ optional value.graphical cfg.modules.darwin.graphical;
}
else