Compare commits
3 commits
416f3d2bf5
...
52a8461d51
Author | SHA1 | Date | |
---|---|---|---|
52a8461d51 | |||
9b1a223c71 | |||
f9381f1389 |
|
@ -95,7 +95,7 @@
|
|||
overlays = load ./overlay "overlay";
|
||||
legacyPackages = eachSystem (system: platform:
|
||||
import nixpkgs {
|
||||
localSystem = builtins.currentSystem or platform;
|
||||
localSystem = builtins.currentSystem or system;
|
||||
crossSystem = platform;
|
||||
overlays = [ self.overlays.default ];
|
||||
config.allowUnsupportedSystem = true;
|
||||
|
@ -120,6 +120,13 @@
|
|||
targetHost = config.networking.fqdnOrHostName;
|
||||
targetUser = null;
|
||||
};
|
||||
|
||||
nixpkgs = let
|
||||
platform = self.lib.platforms.x86_64-linux;
|
||||
in {
|
||||
buildPlatform = builtins.currentSystem or platform.system;
|
||||
hostPlatform = platform;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -4,13 +4,25 @@ let inherit (nixpkgs) lib;
|
|||
in lib.mapAttrs (system: platform: lib.systems.elaborate platform) {
|
||||
"x86_64-linux" = {
|
||||
system = "x86_64-linux";
|
||||
config = "x86_64-unknown-linux-musl";
|
||||
useLLVM = true;
|
||||
linker = "lld";
|
||||
gcc.arch = "x86-64-v3";
|
||||
};
|
||||
|
||||
"aarch64-linux" = {
|
||||
system = "aarch64-linux";
|
||||
config = "aarch64-unknown-linux-musl";
|
||||
useLLVM = true;
|
||||
linker = "lld";
|
||||
gcc.arch = "armv8-a";
|
||||
};
|
||||
|
||||
"riscv64-linux" = {
|
||||
system = "riscv64-linux";
|
||||
config = "riscv64-unknown-linux-musl";
|
||||
useLLVM = true;
|
||||
linker = "lld";
|
||||
gcc.arch = "rv64imacfd";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -258,7 +258,12 @@ imports = [
|
|||
{ from = 6001; to = 6011; }
|
||||
];
|
||||
|
||||
nix = {
|
||||
nix = let
|
||||
base = [ "nixos-test" "benchmark" "big-parallel" "kvm" ];
|
||||
x86-64 = [ "gccarch-x86-64" "gccarch-x86-64-v2" "gccarch-x86-64-v3" ];
|
||||
riscv = [ "gccarch-rv64imac" "gccarch-rv64imacfd" "gccarch-rv64gc" ];
|
||||
aarch = [ "gccarch-armv8-a" ];
|
||||
in {
|
||||
distributedBuilds = true;
|
||||
buildMachines = [
|
||||
{
|
||||
|
@ -268,7 +273,7 @@ imports = [
|
|||
maxJobs = 2;
|
||||
speedFactor = 4;
|
||||
systems = [ "aarch64-linux" ];
|
||||
supportedFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ];
|
||||
supportedFeatures = base ++ aarch;
|
||||
sshKey = "/etc/keys/nix-ssh";
|
||||
}
|
||||
] ++ (lib.range 1 8 |> map (num: {
|
||||
|
@ -278,9 +283,11 @@ imports = [
|
|||
maxJobs = 4;
|
||||
speedFactor = 16;
|
||||
systems = [ "x86_64-linux" "i686-linux" ];
|
||||
supportedFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" "gccarch-x86-64" "gccarch-x86-64-v2" "gccarch-x86-64-v3" ];
|
||||
supportedFeatures = base ++ x86-64;
|
||||
sshKey = "/etc/keys/nix-ssh";
|
||||
}));
|
||||
|
||||
settings.system-features = base ++ x86-64 ++ riscv ++ aarch;
|
||||
};
|
||||
|
||||
programs.ssh = {
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
iosched
|
||||
kernel
|
||||
locale-en_EU
|
||||
musl
|
||||
network
|
||||
nix
|
||||
openssh
|
||||
|
|
7
nixos/module/musl.nix
Normal file
7
nixos/module/musl.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{ ...}: { modulesPath, ... }: {
|
||||
disabledModules = [
|
||||
(modulesPath + "/config/ldso.nix")
|
||||
(modulesPath + "/programs/nix-ld.nix")
|
||||
(modulesPath + "/config/stub-ld.nix")
|
||||
];
|
||||
}
|
|
@ -1,7 +1,6 @@
|
|||
{ self, ... }: { lib, pkgs, ... }:
|
||||
let
|
||||
inherit (pkgs.stdenv) hostPlatform;
|
||||
# inherit (inputs.idiosyn.lib.platforms.${hostPlatform.system}.gcc) arch;
|
||||
in {
|
||||
imports = with self.nixosModules; [
|
||||
powersupply
|
||||
|
@ -42,9 +41,6 @@ in {
|
|||
preallocate-contents = true;
|
||||
use-cgroups = true;
|
||||
use-xdg-base-directories = true;
|
||||
|
||||
/* system-features = lib.mkOptionDefault
|
||||
(map (arch: "gccarch-${arch}") ([ arch ] ++ lib.systems.architectures.inferiors.${arch} or [ ]));*/
|
||||
};
|
||||
|
||||
registry = {
|
||||
|
|
|
@ -4,6 +4,14 @@ let
|
|||
inherit (lib) toList;
|
||||
inherit (prev.stdenv) hostPlatform;
|
||||
in {
|
||||
netbsd = prev.netbsd.overrideScope (final: prev: {
|
||||
compatIfNeeded = [ final.compat ];
|
||||
|
||||
compat = prev.compat.overrideAttrs (prevAttrs: {
|
||||
makeFlags = prevAttrs.makeFlags ++ [ "OBJCOPY=:" ];
|
||||
});
|
||||
});
|
||||
|
||||
numactl = prev.numactl.overrideAttrs (prevAttrs: {
|
||||
patches = prevAttrs.patches or [ ] ++ [
|
||||
(final.fetchpatch {
|
||||
|
@ -13,19 +21,21 @@ in {
|
|||
];
|
||||
});
|
||||
|
||||
python3 = prev.python3.overrideAttrs (prevAttrs: {
|
||||
postFixup = let
|
||||
lib = "$out/lib/${prevAttrs.passthru.libPrefix}";
|
||||
prefix = "_sysconfigdata__linux_";
|
||||
suffix = "${hostPlatform.parsed.cpu.name}-${hostPlatform.libc}";
|
||||
in prevAttrs.postFixup + ''
|
||||
test -e '${lib}/${prefix}${suffix}.py' \
|
||||
|| ln -s '${lib}/${prefix}'{,'${suffix}'}.py
|
||||
'';
|
||||
});
|
||||
|
||||
redis = prev.redis.overrideAttrs {
|
||||
doCheck = false;
|
||||
};
|
||||
|
||||
python312 = prev.python312.override {
|
||||
packageOverrides = final: prev: {
|
||||
pywebview = prev.pywebview.overrideAttrs ({
|
||||
doCheck = false;
|
||||
doInstallCheck = false;
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
sioyek = prev.sioyek.overrideAttrs (prevAttrs: {
|
||||
env = prevAttrs.env or { } // {
|
||||
NIX_CFLAGS_COMPILE = toList prevAttrs.env.NIX_CFLAGS_COMPILE or [ ]
|
||||
|
@ -33,6 +43,14 @@ in {
|
|||
};
|
||||
});
|
||||
|
||||
time = prev.time.overrideAttrs (prevAttrs: {
|
||||
env = prevAttrs.env or { } // {
|
||||
CFLAGS = toList prevAttrs.env.CFLAGS or [ ] ++ [
|
||||
"-Wno-error=implicit-function-declaration"
|
||||
] |> toString;
|
||||
};
|
||||
});
|
||||
|
||||
zeromq = prev.zeromq.overrideAttrs (prevAttrs: {
|
||||
postPatch = prevAttrs.postPatch or "" + ''
|
||||
substituteInPlace CMakeLists.txt \
|
||||
|
|
Loading…
Reference in a new issue