Add cross compilation
This commit is contained in:
parent
1cbc923e74
commit
68b5d1d151
2 changed files with 11 additions and 3 deletions
|
@ -51,6 +51,7 @@ in
|
|||
};
|
||||
nix-common = {
|
||||
enable = true;
|
||||
cross-systems = [ "aarch64-linux" ];
|
||||
};
|
||||
tablet.enable = false;
|
||||
sound.enable = true;
|
||||
|
|
|
@ -8,8 +8,13 @@ with lib; let
|
|||
in
|
||||
{
|
||||
options.eboskma.nix-common = {
|
||||
enable = mkEnableOption "activate nix-common";
|
||||
remote-builders = mkEnableOption "enable remote builders";
|
||||
enable = mkEnableOption "nix-common";
|
||||
remote-builders = mkEnableOption "remote builders";
|
||||
cross-systems = mkOption {
|
||||
description = "list of systems to cross compile for";
|
||||
type = with types; listOf str;
|
||||
default = [];
|
||||
};
|
||||
};
|
||||
|
||||
imports = [
|
||||
|
@ -31,7 +36,7 @@ in
|
|||
buildMachines = mkIf cfg.remote-builders [
|
||||
{
|
||||
hostName = "loki";
|
||||
systems = [ "x86_64-linux" ];
|
||||
systems = [ "x86_64-linux" ] ++ cfg.cross-systems;
|
||||
maxJobs = 8;
|
||||
speedFactor = 2;
|
||||
supportedFeatures = [ "kvm" "big-parallel" "nixos-test" "benchmark" ];
|
||||
|
@ -61,6 +66,8 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
boot.binfmt.emulatedSystems = cfg.cross-systems;
|
||||
|
||||
programs.ssh.extraConfig = mkIf cfg.remote-builders ''
|
||||
Host loki
|
||||
HostName 10.0.0.4
|
||||
|
|
Loading…
Reference in a new issue