Update from update-inputs-2024-11-30-04-20

This commit is contained in:
Update Bot 2024-11-30 04:20:25 +01:00
commit 388fd86ec7
No known key found for this signature in database
6 changed files with 67 additions and 22 deletions

View file

@ -10,7 +10,11 @@
../../services/hydra
../../services/update-nixfiles.nix
];
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
boot.binfmt = {
preferStaticEmulators = true;
emulatedSystems = [ "aarch64-linux" "riscv64-linux" ];
};
networking.hostName = "seras";
systemd.network.networks."98-eth-default" = {

View file

@ -1,6 +1,9 @@
{ config, lib, ... }: {
nix.buildMachines = let
base = [ "nixos-test" "benchmark" "big-parallel" "kvm" ];
x86-64 = [ "gccarch-x86-64" "gccarch-x86-64-v2" "gccarch-x86-64-v3" ];
aarch64 = [ "gccarch-armv8-a" "gccarch-armv8.1-a" "gccarch-armv8.2-a" "gccarch-armv8.2-a+fp16+rcpc+dotprod" ];
riscv64 = [ "gccarch-rv64imac" "gccarch-rv64imacfd" "gccarch-rv64gc" ];
in [
{
hostName = "localhost";
@ -16,7 +19,7 @@
maxJobs = 2;
speedFactor = 4;
systems = [ "aarch64-linux" ];
supportedFeatures = base;
supportedFeatures = base ++ aarch64;
sshKey = config.sops.secrets."services/hydra/id_ed25519_hydra".path;
}
{
@ -25,7 +28,7 @@
maxJobs = 0;
speedFactor = 20;
systems = [ "riscv64-linux" ];
supportedFeatures = base ++ [ "gccarch-rv64imac" "gccarch-rv64imacfd" "gccarch-rv64gc" ];
supportedFeatures = base ++ riscv64;
sshKey = config.sops.secrets."services/hydra/id_ed25519_hydra".path;
}
] ++ lib.forEach (lib.range 0 11) (num: {
@ -33,8 +36,10 @@
sshUser = "root";
maxJobs = 2;
speedFactor = 20;
systems = [ "i686-linux" "x86_64-linux" ];
supportedFeatures = [ "nixos-test" "benchmark" "big-parallel" "gccarch-x86-64" "gccarch-x86-64-v2" "gccarch-x86-64-v3" ];
systems = [ "i686-linux" "x86_64-linux" ]
++ lib.optionals (lib.mod num 5 == 0) [ "aarch64-linux" "riscv64-linux" ];
supportedFeatures = [ "nixos-test" "benchmark" "big-parallel" ] ++ x86-64
++ lib.optionals (lib.mod num 5 == 0) (aarch64 ++ riscv64);
sshKey = config.sops.secrets."services/hydra/id_ed25519_hydra".path;
});
nixpkgs.config.allowUnsupportedSystem = true;

View file

@ -156,11 +156,11 @@
]
},
"locked": {
"lastModified": 1732742778,
"narHash": "sha256-i+Uw8VOHzQe9YdNwKRbzvaPWLE07tYVqUDzSFTXhRgk=",
"lastModified": 1732919362,
"narHash": "sha256-3SxlMD3nSI90+pHOF27SuLEt3+wew8xl+sUJaJMeHOI=",
"owner": "nix-community",
"repo": "disko",
"rev": "341482e2f4d888e3f60cae1c12c3df896e7230d8",
"rev": "b71e3faca99b40fb801f03fd950fbefbbba691a4",
"type": "github"
},
"original": {
@ -199,10 +199,10 @@
"nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1732835047,
"narHash": "sha256-O+JD5tKyCRtE+ZY5cpDQnepcyEP3xDxqSw4irJRxRgM=",
"lastModified": 1732922915,
"narHash": "sha256-cjlX22l8ji0l5WgWM4RfW4vWwzhH+w1WD0w2z+EgZsc=",
"ref": "refs/heads/main",
"rev": "29adbc654463e677bc8bfbfa311c765584446bd8",
"rev": "babe3dff2bc4068bf154432f3225952add20e337",
"revCount": 1,
"type": "git",
"url": "https://woof.rip/mikael/eosyn.git"
@ -239,10 +239,10 @@
"eosyn": "eosyn"
},
"locked": {
"lastModified": 1732835073,
"narHash": "sha256-6pF35LT6oLTFTuwJ4ZxjePY+qHpC4BGcOExJeiUAlxY=",
"lastModified": 1732923157,
"narHash": "sha256-RTi1NpFKXHRIGvWuOXKjhBn5lu5of1HhoNeslmzeWEA=",
"ref": "refs/heads/main",
"rev": "cf453c076add9ee34542a318fa7a7a865087921b",
"rev": "97ed2427a9b258dfec0d79376d6b6669753192bd",
"revCount": 4,
"type": "git",
"url": "https://woof.rip/mikael/firefox.git"
@ -653,11 +653,11 @@
]
},
"locked": {
"lastModified": 1732793095,
"narHash": "sha256-6TrknJ8CpvSSF4gviQSeD+wyj3siRcMvdBKhOXkEMKU=",
"lastModified": 1732884235,
"narHash": "sha256-r8j6R3nrvwbT1aUp4EPQ1KC7gm0pu9VcV1aNaB+XG6Q=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "2f7739d01080feb4549524e8f6927669b61c6ee3",
"rev": "819f682269f4e002884702b87e445c82840c68f2",
"type": "github"
},
"original": {

View file

@ -1,11 +1,13 @@
# I hate this so much aaa
{
lib,
callPackage,
dockerTools,
openssh,
bash,
gnused,
util-linux,
qemu-user
}:
dockerTools.buildLayeredImage {
@ -20,11 +22,28 @@ dockerTools.buildLayeredImage {
enableFakechroot = true;
contents = [ openssh util-linux bash gnused ];
contents = [ openssh util-linux bash gnused qemu-user ];
config.Cmd = [ "/entrypoint.sh" ];
fakeRootCommands = ''
fakeRootCommands = let
system-features = [
"benchmark"
"big-parallel"
"nixos-test"
"uid-range"
"gccarch-x86-64"
"gccarch-x86-64-v2"
"gccarch-x86-64-v3"
"gccarch-armv8-a"
"gccarch-armv8.1-a"
"gccarch-armv8.2-a"
"gccarch-armv8.2-a+fp16+rcpc+dotprod"
"gccarch-rv64imac"
"gccarch-rv64imacfd"
"gccarch-rv64gc"
];
in ''
mkdir -p /root
cat <<EOF > /root/nix.conf
build-users-group = nixbld
@ -36,7 +55,8 @@ dockerTools.buildLayeredImage {
max-silent-time = 14400
min-free = ${builtins.toString (49152 * 1024 * 1024)}
max-free = ${builtins.toString (65536 * 1024 * 1024)}
system-features = benchmark big-parallel kvm nixos-test uid-range gccarch-x86-64 gccarch-x86-64-v2 gccarch-x86-64-v3
extra-platforms = aarch64-linux i686-linux riscv64-linux
system-features = ${toString system-features}
EOF
mkdir -p /root/.ssh
@ -94,7 +114,9 @@ dockerTools.buildLayeredImage {
mkdir -p /var/empty
mkdir -p /var/log
cp ${./entrypoint.sh} /entrypoint.sh
substitute ${./entrypoint.sh} /entrypoint.sh \
--subst-var-by qemu-aarch64 ${lib.getExe' qemu-user "qemu-aarch64"} \
--subst-var-by qemu-riscv64 ${lib.getExe' qemu-user "qemu-riscv64"}
chmod +x /entrypoint.sh
'';
}

View file

@ -26,4 +26,14 @@ cp /root/nix.conf /etc/nix/nix.conf
/bin/mount -t overlay overlay -o lowerdir=/nix,upperdir=/mnt/data/nix-store,workdir=/mnt/data/workdir /nix
/bin/mount --bind /mnt/data/tmp /tmp
# Register QEMU binaries for user mode emulation
aarch64_magic='\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xb7\x00'
aarch64_mask='\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff'
riscv64_magic='\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xf3\x00'
riscv64_mask='\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff'
echo ":qemu-aarch64:M::$aarch64_magic:$aarch64_mask:@qemu-aarch64@:POCF" >/proc/sys/fs/binfmt_misc/register
echo ":qemu-riscv64:M::$riscv64_magic:$riscv64_mask:@qemu-riscv64@:POCF" >/proc/sys/fs/binfmt_misc/register
/root/.nix-profile/bin/sshd -D -f /root/sshd_config

View file

@ -2,7 +2,11 @@ final: prev: {
nyastodon = final.callPackage ./nyastodon/default.nix {};
upgrade-system = final.callPackage ./upgrade-system/default.nix {};
update-nixfiles = final.callPackage ./update-nixfiles/default.nix {};
build-worker-oci = final.callPackage ./build-worker-oci/default.nix {};
build-worker-oci = final.callPackage ./build-worker-oci/default.nix {
qemu-user = final.pkgsStatic.qemu-user.override {
hostCpuTargets = [ "aarch64-linux-user" "riscv64-linux-user" ];
};
};
librespeed-rust = final.callPackage ./librespeed-rust/default.nix {};
librespeed-go = final.callPackage ./librespeed-go/default.nix {};
akkoma-fe-domi = final.callPackage ./akkoma-fe-domi/default.nix {};