git.delta.rocks / jrsonnet / refs/commits / fca1ee17e1b0

difftreelog

feat set nixpkgs.hostPlatform

rukpunypYaroslav Bolyukin2026-01-22parent: #f8886e1.patch.diff
in: trunk

1 file changed

modifiedmodules/nixos.nixdiffbeforeafterboth
36 apply =36 apply =
37 module:37 module:
38 let38 let
39 inherit (hostArgs.config) system;
40 modulesPath = "${config.nixpkgs.buildUsing}/nixos/modules";39 modulesPath = "${config.nixpkgs.buildUsing}/nixos/modules";
41 in40 in
42 config.nixpkgs.buildUsing.lib.evalModules {41 config.nixpkgs.buildUsing.lib.evalModules {
48 ];47 ];
49 specialArgs = {48 specialArgs = {
50 inherit fleetLib inputs self modulesPath;49 inherit fleetLib inputs self modulesPath;
51 inputs' = mapAttrs (
52 inputName: input:
53 builtins.addErrorContext
54 "while retrieving system-dependent attributes for input ${escapeNixIdentifier inputName}"
55 (
56 if input._type or null == "flake" then
57 _fleetFlakeRootConfig.perInput system input
58 else
59 "input is not a flake, perhaps flake = false was added to te input declaration?"
60 )
61 ) inputs;
62 self' = builtins.addErrorContext "while retrieving system-dependent attributes for a flake's own outputs" (
63 _fleetFlakeRootConfig.perInput system self
64 );
65 };50 };
66 };51 };
67 };52 };
73 # imports = [58 # imports = [
74 # (mkRemovedOptionModule ["nixosModules"] "replaced with hosts.*.nixos.imports.")59 # (mkRemovedOptionModule ["nixosModules"] "replaced with hosts.*.nixos.imports.")
75 # ];60 # ];
76 nixos = {61 nixos = let
62 inherit (hostArgs.config) system;
63 in {
77 _module.args = {64 _module.args = {
78 nixosHosts = mapAttrs (_: value: value.nixos_unchecked.config) config.hosts;65 nixosHosts = mapAttrs (_: value: value.nixos_unchecked.config) config.hosts;
79 hosts = config.hosts;66 hosts = config.hosts;
80 host = hostArgs.config;67 host = hostArgs.config;
81 fleetConfiguration = config;68 fleetConfiguration = config;
69
70 inputs' = mapAttrs (
71 inputName: input:
72 builtins.addErrorContext
73 "while retrieving system-dependent attributes for input ${escapeNixIdentifier inputName}"
74 (
75 if input._type or null == "flake" then
76 _fleetFlakeRootConfig.perInput system input
77 else
78 "input is not a flake, perhaps flake = false was added to te input declaration?"
79 )
80 ) inputs;
81 self' = builtins.addErrorContext "while retrieving system-dependent attributes for a flake's own outputs" (
82 _fleetFlakeRootConfig.perInput system self
83 );
82 };84 };
85 nixpkgs.hostPlatform = system;
83 };86 };
84 nixos_unchecked = hostArgs.config.nixos.extendModules {87 nixos_unchecked = hostArgs.config.nixos.extendModules {
85 modules = [88 modules = [