flake.nix: fix memory leak by reorganizing hydraJobs
This commit is contained in:
parent
a050b4b653
commit
7e11e77515
13
flake.nix
13
flake.nix
|
@ -620,18 +620,15 @@
|
|||
rpi-netboot = ./modules/rpi-netboot.nix;
|
||||
};
|
||||
|
||||
hydraJobs = forAllSystems (system:
|
||||
hydraJobs =
|
||||
builtins.mapAttrs (_: nixpkgs.lib.hydraJob) (
|
||||
nixpkgs.lib.filterAttrs (_: toplevel:
|
||||
system == toplevel.system
|
||||
) (builtins.mapAttrs (_: nixosSystem:
|
||||
builtins.mapAttrs (_: nixosSystem:
|
||||
nixosSystem.config.system.build.toplevel
|
||||
) self.nixosConfigurations)
|
||||
) self.nixosConfigurations
|
||||
//
|
||||
nixpkgs.lib.filterAttrs (name: _:
|
||||
builtins.match ".+-tftproot" name != null
|
||||
) self.packages.${system}
|
||||
)
|
||||
);
|
||||
) self.packages.aarch64-linux
|
||||
);
|
||||
};
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
};
|
||||
script = ''
|
||||
OLD=$(readlink /run/current-system)
|
||||
NEW=$(curl -sLH "Accept: application/json" https://hydra.hq.c3d2.de/job/c3d2/nix-config/${pkgs.system}.$(hostname)/latest | jq -r .buildoutputs.out.path)
|
||||
NEW=$(curl -sLH "Accept: application/json" https://hydra.hq.c3d2.de/job/c3d2/nix-config/$(hostname)/latest | jq -r .buildoutputs.out.path)
|
||||
if [ -z "$NEW" ] || [ "$NEW" = "null" ]; then
|
||||
echo "Unable to obtain updated system"
|
||||
exit 1
|
||||
|
@ -76,7 +76,7 @@
|
|||
|
||||
OLD=$(readlink /run/current-system)
|
||||
echo Current system: $(basename $OLD)
|
||||
NEW=$(curl -sLH "Accept: application/json" https://hydra.hq.c3d2.de/job/c3d2/nix-config/${pkgs.system}.$(hostname)/latest | ${pkgs.jq}/bin/jq -r .buildoutputs.out.path)
|
||||
NEW=$(curl -sLH "Accept: application/json" https://hydra.hq.c3d2.de/job/c3d2/nix-config/$(hostname)/latest | ${pkgs.jq}/bin/jq -r .buildoutputs.out.path)
|
||||
if [ -z "$NEW" ] || [ "$NEW" = "null" ]; then
|
||||
echo "Unable to obtain updated system"
|
||||
exit 1
|
||||
|
|
Loading…
Reference in New Issue