nixos-config/config/nix.nix
Charlotte 🦝 Delenk 28f1d0eca9
All checks were successful
Hydra packages.aarch64-linux.plover-plugin-modal-dictionary Hydra build #20839 of nixos-config:pr610:packages.aarch64-linux.plover-plugin-modal-dictionary
Hydra packages.x86_64-linux.plover-plugin-emoji Hydra build #20890 of nixos-config:pr610:packages.x86_64-linux.plover-plugin-emoji
Hydra packages.aarch64-linux.plover-plugin-dotool-output Hydra build #20834 of nixos-config:pr610:packages.aarch64-linux.plover-plugin-dotool-output
Hydra packages.x86_64-linux.emoji-rosaflags Hydra build #20860 of nixos-config:pr610:packages.x86_64-linux.emoji-rosaflags
Hydra packages.x86_64-linux.python-tulir-telethon Hydra build #20906 of nixos-config:pr610:packages.x86_64-linux.python-tulir-telethon
Hydra packages.x86_64-linux.kreative-square Hydra build #20875 of nixos-config:pr610:packages.x86_64-linux.kreative-square
Hydra packages.aarch64-linux.mautrix-whatsapp Hydra build #20826 of nixos-config:pr610:packages.aarch64-linux.mautrix-whatsapp
Hydra packages.x86_64-linux.plover-plugin-dict-commands Hydra build #20888 of nixos-config:pr610:packages.x86_64-linux.plover-plugin-dict-commands
Hydra packages.aarch64-linux.emoji-volpeon-raccoon Hydra build #20816 of nixos-config:pr610:packages.aarch64-linux.emoji-volpeon-raccoon
Hydra packages.x86_64-linux.lotte-art Hydra build #20876 of nixos-config:pr610:packages.x86_64-linux.lotte-art
Hydra packages.aarch64-linux.kreative-square Hydra build #20820 of nixos-config:pr610:packages.aarch64-linux.kreative-square
Hydra packages.aarch64-linux.python-plover-stroke Hydra build #20848 of nixos-config:pr610:packages.aarch64-linux.python-plover-stroke
Hydra packages.x86_64-linux.emoji-volpeon-bunhd Hydra build #20863 of nixos-config:pr610:packages.x86_64-linux.emoji-volpeon-bunhd
Hydra packages.aarch64-linux.python-simplefuzzyset Hydra build #20850 of nixos-config:pr610:packages.aarch64-linux.python-simplefuzzyset
Hydra packages.aarch64-linux.plover-plugin-stenotype-extended Hydra build #20842 of nixos-config:pr610:packages.aarch64-linux.plover-plugin-stenotype-extended
Hydra packages.aarch64-linux.emoji-volpeon-blobfox-flip Hydra build #20807 of nixos-config:pr610:packages.aarch64-linux.emoji-volpeon-blobfox-flip
Hydra packages.x86_64-linux.emoji-volpeon-bunhd-flip Hydra build #20864 of nixos-config:pr610:packages.x86_64-linux.emoji-volpeon-bunhd-flip
Hydra packages.x86_64-linux.emoji-raccoon Hydra build #20859 of nixos-config:pr610:packages.x86_64-linux.emoji-raccoon
Hydra packages.x86_64-linux.emoji-volpeon-neofox Hydra build #20870 of nixos-config:pr610:packages.x86_64-linux.emoji-volpeon-neofox
Hydra packages.x86_64-linux.emoji-volpeon-drgn Hydra build #20865 of nixos-config:pr610:packages.x86_64-linux.emoji-volpeon-drgn
Hydra packages.aarch64-linux.emoji-caro Hydra build #20802 of nixos-config:pr610:packages.aarch64-linux.emoji-caro
Hydra packages.aarch64-linux.lotte-art Hydra build #20821 of nixos-config:pr610:packages.aarch64-linux.lotte-art
Hydra packages.x86_64-linux.plover-plugin-tapey-tape Hydra build #20899 of nixos-config:pr610:packages.x86_64-linux.plover-plugin-tapey-tape
Hydra packages.x86_64-linux.constructium Hydra build #20856 of nixos-config:pr610:packages.x86_64-linux.constructium
Hydra packages.x86_64-linux.fairfax-hd Hydra build #20874 of nixos-config:pr610:packages.x86_64-linux.fairfax-hd
Hydra packages.aarch64-linux.mgba-dev Hydra build #20827 of nixos-config:pr610:packages.aarch64-linux.mgba-dev
Hydra packages.aarch64-linux.mautrix-telegram Hydra build #20825 of nixos-config:pr610:packages.aarch64-linux.mautrix-telegram
Hydra packages.x86_64-linux.plover-plugin-dotool-output Hydra build #20889 of nixos-config:pr610:packages.x86_64-linux.plover-plugin-dotool-output
Hydra packages.x86_64-linux.emoji-volpeon-gphn Hydra build #20868 of nixos-config:pr610:packages.x86_64-linux.emoji-volpeon-gphn
Hydra packages.x86_64-linux.plover-plugin-modal-dictionary Hydra build #20894 of nixos-config:pr610:packages.x86_64-linux.plover-plugin-modal-dictionary
Hydra packages.aarch64-linux.fairfax Hydra build #20818 of nixos-config:pr610:packages.aarch64-linux.fairfax
Hydra packages.aarch64-linux.emoji-raccoon Hydra build #20804 of nixos-config:pr610:packages.aarch64-linux.emoji-raccoon
Hydra packages.aarch64-linux.plover-plugin-yaml-dictionary Hydra build #20845 of nixos-config:pr610:packages.aarch64-linux.plover-plugin-yaml-dictionary
Hydra packages.x86_64-linux.plover-plugin-lapwing-aio Hydra build #20891 of nixos-config:pr610:packages.x86_64-linux.plover-plugin-lapwing-aio
Hydra packages.aarch64-linux.emoji-volpeon-bunhd-flip Hydra build #20809 of nixos-config:pr610:packages.aarch64-linux.emoji-volpeon-bunhd-flip
Hydra packages.x86_64-linux.miifox-net Hydra build #20883 of nixos-config:pr610:packages.x86_64-linux.miifox-net
Hydra packages.x86_64-linux.emoji-volpeon-floof Hydra build #20866 of nixos-config:pr610:packages.x86_64-linux.emoji-volpeon-floof
Hydra packages.x86_64-linux.mautrix-telegram Hydra build #20880 of nixos-config:pr610:packages.x86_64-linux.mautrix-telegram
Hydra packages.x86_64-linux.mgba-dev Hydra build #20882 of nixos-config:pr610:packages.x86_64-linux.mgba-dev
Hydra packages.aarch64-linux.yiffstash Hydra build #20852 of nixos-config:pr610:packages.aarch64-linux.yiffstash
Hydra packages.x86_64-linux.plover-plugin-python-dictionary Hydra build #20895 of nixos-config:pr610:packages.x86_64-linux.plover-plugin-python-dictionary
Hydra packages.x86_64-linux.plover-plugin-last-translation Hydra build #20892 of nixos-config:pr610:packages.x86_64-linux.plover-plugin-last-translation
Hydra packages.x86_64-linux.yiffstash Hydra build #20907 of nixos-config:pr610:packages.x86_64-linux.yiffstash
Hydra packages.aarch64-linux.plover-plugin-dict-commands Hydra build #20833 of nixos-config:pr610:packages.aarch64-linux.plover-plugin-dict-commands
Hydra packages.aarch64-linux.emoji-volpeon-gphn Hydra build #20813 of nixos-config:pr610:packages.aarch64-linux.emoji-volpeon-gphn
Hydra packages.aarch64-linux.plover-plugin-emoji Hydra build #20835 of nixos-config:pr610:packages.aarch64-linux.plover-plugin-emoji
Hydra packages.x86_64-linux.emoji-volpeon-vlpn Hydra build #20872 of nixos-config:pr610:packages.x86_64-linux.emoji-volpeon-vlpn
Hydra packages.x86_64-linux.plover-plugin-rkb1-hid Hydra build #20896 of nixos-config:pr610:packages.x86_64-linux.plover-plugin-rkb1-hid
Hydra packages.x86_64-linux.emoji-volpeon-raccoon Hydra build #20871 of nixos-config:pr610:packages.x86_64-linux.emoji-volpeon-raccoon
Hydra packages.aarch64-linux.plover-plugin-python-dictionary Hydra build #20840 of nixos-config:pr610:packages.aarch64-linux.plover-plugin-python-dictionary
Hydra packages.aarch64-linux.plover-plugin-machine-hid Hydra build #20838 of nixos-config:pr610:packages.aarch64-linux.plover-plugin-machine-hid
Hydra packages.aarch64-linux.mautrix-discord Hydra build #20823 of nixos-config:pr610:packages.aarch64-linux.mautrix-discord
Hydra packages.x86_64-linux.plover-plugins-manager Hydra build #20901 of nixos-config:pr610:packages.x86_64-linux.plover-plugins-manager
Hydra packages.aarch64-linux.emoji-volpeon-bunhd Hydra build #20808 of nixos-config:pr610:packages.aarch64-linux.emoji-volpeon-bunhd
Hydra packages.aarch64-linux.plover-plugin-rkb1-hid Hydra build #20841 of nixos-config:pr610:packages.aarch64-linux.plover-plugin-rkb1-hid
Hydra packages.x86_64-linux.plover-plugin-stenotype-extended Hydra build #20897 of nixos-config:pr610:packages.x86_64-linux.plover-plugin-stenotype-extended
Hydra packages.aarch64-linux.emoji-rosaflags Hydra build #20805 of nixos-config:pr610:packages.aarch64-linux.emoji-rosaflags
Hydra packages.aarch64-linux.alco-sans Hydra build #20798 of nixos-config:pr610:packages.aarch64-linux.alco-sans
Hydra packages.aarch64-linux.asar-asm Hydra build #20799 of nixos-config:pr610:packages.aarch64-linux.asar-asm
Hydra packages.x86_64-linux.python-rtf-tokenize Hydra build #20904 of nixos-config:pr610:packages.x86_64-linux.python-rtf-tokenize
Hydra packages.x86_64-linux.mautrix-discord Hydra build #20878 of nixos-config:pr610:packages.x86_64-linux.mautrix-discord
Hydra packages.x86_64-linux.python-simplefuzzyset Hydra build #20905 of nixos-config:pr610:packages.x86_64-linux.python-simplefuzzyset
Hydra devShell.x86_64-linux Hydra build #20793 of nixos-config:pr610:devShell.x86_64-linux
Hydra packages.x86_64-linux.fairfax Hydra build #20873 of nixos-config:pr610:packages.x86_64-linux.fairfax
Hydra packages.x86_64-linux.alco-sans Hydra build #20853 of nixos-config:pr610:packages.x86_64-linux.alco-sans
Hydra packages.x86_64-linux.plover-plugin-machine-hid Hydra build #20893 of nixos-config:pr610:packages.x86_64-linux.plover-plugin-machine-hid
Hydra packages.x86_64-linux.python-plover-stroke Hydra build #20903 of nixos-config:pr610:packages.x86_64-linux.python-plover-stroke
Hydra packages.x86_64-linux.emoji-volpeon-fox Hydra build #20867 of nixos-config:pr610:packages.x86_64-linux.emoji-volpeon-fox
Hydra packages.x86_64-linux.asar-asm Hydra build #20854 of nixos-config:pr610:packages.x86_64-linux.asar-asm
Hydra packages.aarch64-linux.constructium Hydra build #20801 of nixos-config:pr610:packages.aarch64-linux.constructium
Hydra packages.x86_64-linux.mautrix-slack Hydra build #20879 of nixos-config:pr610:packages.x86_64-linux.mautrix-slack
Hydra packages.x86_64-linux.python-mautrix Hydra build #20902 of nixos-config:pr610:packages.x86_64-linux.python-mautrix
Hydra packages.x86_64-linux.matrix-media-repo Hydra build #20877 of nixos-config:pr610:packages.x86_64-linux.matrix-media-repo
Hydra packages.x86_64-linux.plover Hydra build #20886 of nixos-config:pr610:packages.x86_64-linux.plover
Hydra packages.x86_64-linux.plover-dict-didoesdigital Hydra build #20887 of nixos-config:pr610:packages.x86_64-linux.plover-dict-didoesdigital
Hydra packages.aarch64-linux.emoji-volpeon-vlpn Hydra build #20817 of nixos-config:pr610:packages.aarch64-linux.emoji-volpeon-vlpn
Hydra packages.aarch64-linux.mautrix-slack Hydra build #20824 of nixos-config:pr610:packages.aarch64-linux.mautrix-slack
Hydra packages.aarch64-linux.python-mautrix Hydra build #20847 of nixos-config:pr610:packages.aarch64-linux.python-mautrix
Hydra packages.aarch64-linux.plover-plugin-last-translation Hydra build #20837 of nixos-config:pr610:packages.aarch64-linux.plover-plugin-last-translation
Hydra packages.aarch64-linux.plover-plugin-stitching Hydra build #20843 of nixos-config:pr610:packages.aarch64-linux.plover-plugin-stitching
Hydra packages.aarch64-linux.plover-plugins-manager Hydra build #20846 of nixos-config:pr610:packages.aarch64-linux.plover-plugins-manager
Hydra packages.aarch64-linux.python-rtf-tokenize Hydra build #20849 of nixos-config:pr610:packages.aarch64-linux.python-rtf-tokenize
Hydra packages.aarch64-linux.plover-dict-didoesdigital Hydra build #20832 of nixos-config:pr610:packages.aarch64-linux.plover-dict-didoesdigital
Hydra packages.aarch64-linux.emoji-volpeon-blobfox Hydra build #20806 of nixos-config:pr610:packages.aarch64-linux.emoji-volpeon-blobfox
Hydra packages.aarch64-linux.plover-plugin-tapey-tape Hydra build #20844 of nixos-config:pr610:packages.aarch64-linux.plover-plugin-tapey-tape
Hydra packages.aarch64-linux.plover-plugin-lapwing-aio Hydra build #20836 of nixos-config:pr610:packages.aarch64-linux.plover-plugin-lapwing-aio
Hydra packages.aarch64-linux.emoji-volpeon-neocat Hydra build #20814 of nixos-config:pr610:packages.aarch64-linux.emoji-volpeon-neocat
Hydra packages.aarch64-linux.papermc Hydra build #20830 of nixos-config:pr610:packages.aarch64-linux.papermc
Hydra packages.x86_64-linux.plover-plugin-yaml-dictionary Hydra build #20900 of nixos-config:pr610:packages.x86_64-linux.plover-plugin-yaml-dictionary
Hydra packages.aarch64-linux.bsnes-plus Hydra build #20800 of nixos-config:pr610:packages.aarch64-linux.bsnes-plus
Hydra packages.x86_64-linux.mautrix-whatsapp Hydra build #20881 of nixos-config:pr610:packages.x86_64-linux.mautrix-whatsapp
Hydra packages.aarch64-linux.nasin-nanpa Hydra build #20829 of nixos-config:pr610:packages.aarch64-linux.nasin-nanpa
Hydra packages.aarch64-linux.emoji-volpeon-fox Hydra build #20812 of nixos-config:pr610:packages.aarch64-linux.emoji-volpeon-fox
Hydra packages.aarch64-linux.miifox-net Hydra build #20828 of nixos-config:pr610:packages.aarch64-linux.miifox-net
Hydra packages.x86_64-linux.emoji-volpeon-blobfox-flip Hydra build #20862 of nixos-config:pr610:packages.x86_64-linux.emoji-volpeon-blobfox-flip
Hydra packages.aarch64-linux.emoji-volpeon-neofox Hydra build #20815 of nixos-config:pr610:packages.aarch64-linux.emoji-volpeon-neofox
Hydra packages.x86_64-linux.emoji-caro Hydra build #20857 of nixos-config:pr610:packages.x86_64-linux.emoji-caro
Hydra packages.aarch64-linux.emoji-volpeon-floof Hydra build #20811 of nixos-config:pr610:packages.aarch64-linux.emoji-volpeon-floof
Hydra packages.x86_64-linux.plover-plugin-stitching Hydra build #20898 of nixos-config:pr610:packages.x86_64-linux.plover-plugin-stitching
Hydra packages.aarch64-linux.fairfax-hd Hydra build #20819 of nixos-config:pr610:packages.aarch64-linux.fairfax-hd
Hydra packages.x86_64-linux.bsnes-plus Hydra build #20855 of nixos-config:pr610:packages.x86_64-linux.bsnes-plus
Hydra packages.aarch64-linux.python-tulir-telethon Hydra build #20851 of nixos-config:pr610:packages.aarch64-linux.python-tulir-telethon
Hydra packages.x86_64-linux.emoji-volpeon-neocat Hydra build #20869 of nixos-config:pr610:packages.x86_64-linux.emoji-volpeon-neocat
Hydra packages.aarch64-linux.emoji-lotte Hydra build #20803 of nixos-config:pr610:packages.aarch64-linux.emoji-lotte
Hydra packages.x86_64-linux.emoji-lotte Hydra build #20858 of nixos-config:pr610:packages.x86_64-linux.emoji-lotte
Hydra vf2.riscv64-linux Hydra build #20910 of nixos-config:pr610:vf2.riscv64-linux
Hydra packages.x86_64-linux.nasin-nanpa Hydra build #20884 of nixos-config:pr610:packages.x86_64-linux.nasin-nanpa
Hydra packages.x86_64-linux.emoji-volpeon-blobfox Hydra build #20861 of nixos-config:pr610:packages.x86_64-linux.emoji-volpeon-blobfox
Hydra packages.aarch64-linux.emoji-volpeon-drgn Hydra build #20810 of nixos-config:pr610:packages.aarch64-linux.emoji-volpeon-drgn
Hydra packages.aarch64-linux.plover Hydra build #20831 of nixos-config:pr610:packages.aarch64-linux.plover
Hydra packages.aarch64-linux.matrix-media-repo Hydra build #20822 of nixos-config:pr610:packages.aarch64-linux.matrix-media-repo
Hydra packages.x86_64-linux.papermc Hydra build #20885 of nixos-config:pr610:packages.x86_64-linux.papermc
Hydra installer.x86_64-linux Hydra build #20794 of nixos-config:pr610:installer.x86_64-linux
Hydra rainbow-resort.x86_64-linux Hydra build #20908 of nixos-config:pr610:rainbow-resort.x86_64-linux
Hydra thinkrac.x86_64-linux Hydra build #20909 of nixos-config:pr610:thinkrac.x86_64-linux
Hydra nixos-8gb-fsn1-1.x86_64-linux Hydra build #20797 of nixos-config:pr610:nixos-8gb-fsn1-1.x86_64-linux
Hydra instance-20221213-1915.aarch64-linux Hydra build #20795 of nixos-config:pr610:instance-20221213-1915.aarch64-linux
Hydra nas.x86_64-linux Hydra build #20796 of nixos-config:pr610:nas.x86_64-linux
update bridge configs
2024-10-27 06:50:41 +01:00

208 lines
6 KiB
Nix

{
pkgs,
lib,
config,
system,
attic,
...
}: {
imports = [
./workarounds
];
nixpkgs.config.allowUnfree = true;
nix = {
settings = {
sandbox = true;
trusted-users = ["@wheel" "remote-build"];
require-sigs = true;
substituters = [
"https://attic.chir.rs/chir-rs/"
"https://hydra.int.chir.rs"
];
trusted-public-keys = [
"nixcache:8KKuGz95Pk4UJ5W/Ni+pN+v+LDTkMMFV4yrGmAYgkDg="
"hydra.nixos.org-1:CNHJZBh9K4tP3EKF6FkkgeVYsS3ohTl+oS0Qa8bezVs="
"chir-rs:rzK1Czm3RqBbZLnXYrLM6JyOhfr6Z/8lhACIPO/LNFQ="
];
auto-optimise-store = true;
};
extraOptions = ''
experimental-features = nix-command flakes ca-derivations
'';
gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 7d";
};
buildMachines = with lib;
mkMerge [
(mkIf (config.networking.hostName != "instance-20221213-1915") [
{
hostName = "build-aarch64";
systems = [
"aarch64-linux"
"riscv32-linux"
"riscv64-linux"
];
maxJobs = 4;
speedFactor = 1;
supportedFeatures = ["nixos-test" "benchmark" "ca-derivations" "gccarch-armv8-a" "gccarch-armv8.1-a" "gccarch-armv8.2-a" "big-parallel"];
}
])
(mkIf (config.networking.hostName != "nas") [
{
hostName = "build-nas";
systems = [
"i686-linux"
"x86_64-linux"
"armv7l-linux"
"powerpc-linux"
"powerpc64-linux"
"powerpc64le-linux"
"wasm32-wasi"
"riscv32-linux"
"riscv64-linux"
];
maxJobs = 12;
speedFactor = 1;
supportedFeatures = [
"kvm"
"nixos-test"
"big-parallel"
"benchmark"
"gccarch-znver1"
"gccarch-skylake"
"ca-derivations"
];
}
])
(mkIf (config.networking.hostName != "rainbow-resort") [
{
hostName = "build-rainbow-resort";
systems = [
"i686-linux"
"x86_64-linux"
"armv7l-linux"
"powerpc-linux"
"powerpc64-linux"
"powerpc64le-linux"
"wasm32-wasi"
"riscv32-linux"
"riscv64-linux"
];
maxJobs = 16;
speedFactor = 1;
supportedFeatures = [
"kvm"
"nixos-test"
"big-parallel"
"benchmark"
"gccarch-skylake-avx512"
"gccarch-znver3"
"gccarch-znver2"
"gccarch-znver1"
"gccarch-skylake"
"ca-derivations"
];
}
])
(mkIf (config.networking.hostName != "vf2") [
{
hostName = "build-riscv";
systems = [
"riscv32-linux"
"riscv64-linux"
];
maxJobs = 4;
speedFactor = 2;
supportedFeatures = [
"nixos-test"
"big-parallel"
"benchmark"
"ca-derivations"
# There are many more combinations but i simply do not care lol
"gccarch-rv64gc_zba_zbb"
"gccarch-rv64gc_zba"
"gccarch-rv64gc_zbb"
"gccarch-rv64gc"
"gccarch-rv32gc_zba_zbb"
"gccarch-rv32gc_zba"
"gccarch-rv32gc_zbb"
"gccarch-rv32gc"
"native-riscv"
];
}
])
];
distributedBuilds = true;
};
systemd.services.nix-daemon.environment.TMPDIR = "/build";
systemd.services.nixos-upgrade = {
description = "NixOS Upgrade";
restartIfChanged = false;
unitConfig.X-StopOnRemoval = false;
serviceConfig.Type = "oneshot";
path = with pkgs; [
coreutils
gnutar
xz.bin
gzip
gitMinimal
config.nix.package.out
config.programs.ssh.package
jq
curl
];
script = lib.mkDefault ''
#!${pkgs.bash}/bin/bash
set -ex
builds=$(${pkgs.curl}/bin/curl -H 'accept: application/json' https://hydra.int.chir.rs/jobset/flakes/${
if config.networking.hostName != "vf2"
then "nixos-config"
else "nixos-config-riscv"
}/evals | ${pkgs.jq}/bin/jq -r '.evals[0].builds[]')
for build in $builds; do
doc=$(${pkgs.curl}/bin/curl -H 'accept: application/json' https://hydra.int.chir.rs/build/$build)
jobname=$(echo $doc | ${pkgs.jq}/bin/jq -r '.job')
if [ "$jobname" = "${config.networking.hostName}.${system}" ]; then
drvname=$(echo $doc | ${pkgs.jq}/bin/jq -r '.drvpath')
output=$(${pkgs.nix}/bin/nix-store -r $drvname)
${pkgs.nix}/bin/nix-env -p /nix/var/nix/profiles/system --set $output
${
if config.networking.hostName != "nixos-8gb-fsn1-1"
then ''
$output/bin/switch-to-configuration boot
booted="$(${pkgs.coreutils}/bin/readlink /run/booted-system/{initrd,kernel,kernel-modules})"
built="$(${pkgs.coreutils}/bin/readlink $output/{initrd,kernel,kernel-modules})"
if [ "$booted" = "$built" ]; then
$output/bin/switch-to-configuration switch
else
${pkgs.systemd}/bin/shutdown -r +1
fi
exit
''
else "$output/bin/switch-to-configuration switch"
}
fi
done
'';
after = ["network-online.target"];
wants = ["network-online.target"];
};
systemd.timers.nixos-upgrade = {
enable = true;
description = "Automatically update nixos";
requires = ["nixos-upgrade.service"];
wantedBy = ["multi-user.target"];
timerConfig = {
OnUnitActiveSec = "30min";
RandomizedDelaySec = "1h";
};
};
}