ci: don't eval full systems with specialisations

this should fix the ungodly memory usage that keeps crashing my runners
This commit is contained in:
NullBite 2025-03-02 17:24:03 -05:00
parent c49fa018b3
commit f309435739
Signed by: nullbite
GPG Key ID: 6C4D545385D4925A
2 changed files with 19 additions and 4 deletions

View File

@ -6,6 +6,7 @@ err=0
set_error () {
err=1
pkill -s 0 -9 nix-eval-jobs || true
}
trap set_error ERR
@ -15,16 +16,20 @@ system="$(nix eval --impure --raw --expr 'builtins.currentSystem')"
run_builds () {
for i in "$@" ; do
# nix-fast-build --eval-workers 1 --no-nom --skip-cache --attic-cache main -f "$i"
# sure let's waste bandwidth becuase nix-fast-build uses an ungodly amount of memory for some reason
nix build --no-link "$i"
nix-fast-build --eval-workers 1 --no-nom --skip-cache --attic-cache main -f "$i"
pkill -s 0 -9 nix-eval-jobs || true
done
}
build_systems () {
case "$system" in
# TODO this is messy and hard-coded, make an attribute set for
# each system containing the specializations as well as the nospec ver
x86_64-linux) run_builds \
.\#nixosConfigurations.nullbox.config.system.build.toplevel \
.\#nixosConfigurations.nullbox.config.specialisation.hyprland.configuration.system.build.toplevel \
.\#nospec.nullbox.config.system.build.toplevel \
.\#nixosConfigurations.slab.config.specialisation.{hyprland,nvidia}.configuration.system.build.toplevel \
.\#nospec.slab.config.system.build.toplevel \
.\#nixosConfigurations.slab.config.system.build.toplevel \
.\#nixosConfigurations.nixos-wsl.config.system.build.toplevel \
;;

View File

@ -300,6 +300,16 @@
iso = mkISOSystem "x86_64-linux";
}; # end nixosConfigurations
nospec = lib.mapAttrs (n: v:
v.extendModules {
modules = [
(
{lib, ...}: {specialisation = lib.mkForce {};}
)
];
})
config.flake.nixosConfigurations;
homeConfigurations = {
# minimal root config
"root@rpi4" = mkHome {