1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2024-12-14 11:57:34 +00:00

Merge pull request #974 from nicknovitski/linux-builder-crossarch

This commit is contained in:
Michael Hoang 2024-06-17 22:17:38 +00:00 committed by GitHub
commit 29b3096a6e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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"