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:
parent
c49fa018b3
commit
f309435739
@ -6,6 +6,7 @@ err=0
|
|||||||
|
|
||||||
set_error () {
|
set_error () {
|
||||||
err=1
|
err=1
|
||||||
|
pkill -s 0 -9 nix-eval-jobs || true
|
||||||
}
|
}
|
||||||
|
|
||||||
trap set_error ERR
|
trap set_error ERR
|
||||||
@ -15,16 +16,20 @@ system="$(nix eval --impure --raw --expr 'builtins.currentSystem')"
|
|||||||
|
|
||||||
run_builds () {
|
run_builds () {
|
||||||
for i in "$@" ; do
|
for i in "$@" ; do
|
||||||
# nix-fast-build --eval-workers 1 --no-nom --skip-cache --attic-cache main -f "$i"
|
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
|
pkill -s 0 -9 nix-eval-jobs || true
|
||||||
nix build --no-link "$i"
|
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
build_systems () {
|
build_systems () {
|
||||||
case "$system" in
|
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 \
|
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.slab.config.system.build.toplevel \
|
||||||
.\#nixosConfigurations.nixos-wsl.config.system.build.toplevel \
|
.\#nixosConfigurations.nixos-wsl.config.system.build.toplevel \
|
||||||
;;
|
;;
|
||||||
|
10
flake.nix
10
flake.nix
@ -300,6 +300,16 @@
|
|||||||
iso = mkISOSystem "x86_64-linux";
|
iso = mkISOSystem "x86_64-linux";
|
||||||
}; # end nixosConfigurations
|
}; # end nixosConfigurations
|
||||||
|
|
||||||
|
nospec = lib.mapAttrs (n: v:
|
||||||
|
v.extendModules {
|
||||||
|
modules = [
|
||||||
|
(
|
||||||
|
{lib, ...}: {specialisation = lib.mkForce {};}
|
||||||
|
)
|
||||||
|
];
|
||||||
|
})
|
||||||
|
config.flake.nixosConfigurations;
|
||||||
|
|
||||||
homeConfigurations = {
|
homeConfigurations = {
|
||||||
# minimal root config
|
# minimal root config
|
||||||
"root@rpi4" = mkHome {
|
"root@rpi4" = mkHome {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user