diff --git a/src/default.nix b/src/default.nix index 762356d..e7e61e3 100644 --- a/src/default.nix +++ b/src/default.nix @@ -31,11 +31,14 @@ let (self: { inherit lib nixpkgsOnBuildForBuild; })).overrideScope' (lib.foldl' lib.composeExtensions (_: prev: prev) ([base] ++ overlays)); + common_amd64 = import ./platform/common/amd64.nix { inherit lib; }; + common_arm64 = import ./platform/common/arm64.nix { inherit lib; }; + in { # one entry for each supported platform - kevin = ownerboot (import ./platform/kevin { inherit lib; }); - am1i = ownerboot (import ./platform/am1i { inherit lib; }); - kgpe = ownerboot (import ./platform/kgpe { inherit lib; }); + kevin = ownerboot (import ./platform/kevin { inherit lib common_arm64; }); + am1i = ownerboot (import ./platform/am1i { inherit lib common_amd64; }); + kgpe = ownerboot (import ./platform/kgpe { inherit lib common_amd64; }); em100 = nixpkgsOnBuildForBuild.callPackage ./util/em100 { }; } diff --git a/src/platform/am1i/default.nix b/src/platform/am1i/default.nix index bb1478c..4414608 100644 --- a/src/platform/am1i/default.nix +++ b/src/platform/am1i/default.nix @@ -1,10 +1,11 @@ { lib ? import , hostPlatform ? lib.systems.examples.gnu64 +, common_amd64 }: { inherit hostPlatform; - overlays = [(final: prev: { + overlays = common_amd64.overlays ++ [(final: prev: { platform_name = "am1i"; diff --git a/src/platform/common/amd64.nix b/src/platform/common/amd64.nix new file mode 100644 index 0000000..a6fac26 --- /dev/null +++ b/src/platform/common/amd64.nix @@ -0,0 +1,7 @@ +{ lib ? import +}: + +{ + overlays = [( final: prev: { + })]; +} diff --git a/src/platform/common/arm64.nix b/src/platform/common/arm64.nix new file mode 100644 index 0000000..c512951 --- /dev/null +++ b/src/platform/common/arm64.nix @@ -0,0 +1,7 @@ +{ lib ? import +}: + +{ + overlays = [(final: prev: { + })]; +} diff --git a/src/platform/kevin/default.nix b/src/platform/kevin/default.nix index b5d05e6..76ad720 100644 --- a/src/platform/kevin/default.nix +++ b/src/platform/kevin/default.nix @@ -1,5 +1,6 @@ { lib ? import , hostPlatform ? lib.systems.examples.aarch64-multiplatform +, common_arm64 }: let # order matters! this is also the order in which the modules are insmoded @@ -36,7 +37,7 @@ let in { inherit hostPlatform; - overlays = [(final: prev: { + overlays = common_arm64.overlays ++ [(final: prev: { nixpkgsOnBuildForHost = prev.nixpkgsOnBuildForBuild.pkgsCross.aarch64-multiplatform; platform_name = "kevin"; diff --git a/src/platform/kgpe/default.nix b/src/platform/kgpe/default.nix index 0b47683..1184c87 100644 --- a/src/platform/kgpe/default.nix +++ b/src/platform/kgpe/default.nix @@ -1,11 +1,12 @@ { lib ? import , hostPlatform ? lib.systems.examples.gnu64 +, common_amd64 }: { inherit hostPlatform; - overlays = [(final: prev: { + overlays = common_amd64.overlays ++ [(final: prev: { platform_name = "kgpe";