diff options
| author | Michael Hoang <Enzime@users.noreply.github.com> | 2024-06-17 22:17:38 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-17 22:17:38 +0000 |
| commit | 29b3096a6e283d7e6779187244cb2a3942239fdf (patch) | |
| tree | 08bf6c9d254846866d9701dab3517c27ccf83f15 /modules | |
| parent | 58b905ea87674592aa84c37873e6c07bc3807aba (diff) | |
| parent | d21ba5a4871f02c50efc2de0ae61b749a6318a10 (diff) | |
Merge pull request #974 from nicknovitski/linux-builder-crossarch
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/nix/linux-builder.nix | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/modules/nix/linux-builder.nix b/modules/nix/linux-builder.nix index 21de7ad..67284b2 100644 --- a/modules/nix/linux-builder.nix +++ b/modules/nix/linux-builder.nix @@ -7,9 +7,11 @@ let cfg = config.nix.linux-builder; - builderWithOverrides = cfg.package.override { - modules = [ cfg.config ]; - }; + builderWithOverrides = cfg.package.override (previousArguments: { + # the linux-builder packages require a list `modules` argument, so it's + # always non-null. + modules = previousArguments.modules ++ [ cfg.config ]; + }); # create-builder uses TMPDIR to share files with the builder, notably certs. # macOS will clean up files in /tmp automatically that haven't been accessed in 3+ days. @@ -133,8 +135,10 @@ in systems = mkOption { type = types.listOf types.str; - default = [ "${stdenv.hostPlatform.uname.processor}-linux" ]; - defaultText = literalExpression ''[ "''${stdenv.hostPlatform.uname.processor}-linux" ]''; + default = [ builderWithOverrides.nixosConfig.nixpkgs.hostPlatform.system ]; + defaultText = '' + The `nixpkgs.hostPlatform.system` of the build machine's final NixOS configuration. + ''; example = literalExpression '' [ "x86_64-linux" |
