git.delta.rocks / fleet / refs/commits / 7bbada6c128c

difftreelog

fix buildUsing should be overridable at host level

ovzwlypkYaroslav Bolyukin2026-05-30parent: #46fb5c0.patch.diff

1 file changed

modifiedmodules/nixos.nixdiffbeforeafterboth
33 hostArgs:33 hostArgs:
34 let34 let
35 hostName = hostArgs.config._module.args.name;35 hostName = hostArgs.config._module.args.name;
36 hostConfig = hostArgs.config;
36 in37 in
37 {38 {
38 inherit _file;39 inherit _file;
52 apply =53 apply =
53 module:54 module:
54 let55 let
55 modulesPath = "${config.nixpkgs.buildUsing}/nixos/modules";56 modulesPath = "${hostConfig.nixpkgs.buildUsing}/nixos/modules";
56 baseModules = (import "${modulesPath}/module-list.nix");57 baseModules = (import "${modulesPath}/module-list.nix");
57 modules = baseModules ++ [58 modules = baseModules ++ [
58 (module // { key = "attr<host.nixos>"; })59 (module // { key = "attr<host.nixos>"; })
59 (config.nixos // { key = "attr<fleet.nixos>"; })60 (config.nixos // { key = "attr<fleet.nixos>"; })
60 ];61 ];
61 in
62 config.nixpkgs.buildUsing.lib.evalModules {62 normalEval = hostConfig.nixpkgs.buildUsing.lib.evalModules {
63 class = "nixos";63 class = "nixos";
64 prefix = [64 prefix = [
65 "fleetConfiguration"65 "fleetConfiguration"
80 noUserModules = baseModules;80 noUserModules = baseModules;
81 extraModules = [ ];81 extraModules = [ ];
82 };82 };
83 };83 };
84 in
85 normalEval;
84 };86 };
85 nixos_unchecked = mkOption {87 nixos_unchecked = mkOption {
86 type = unspecified;88 type = unspecified;