infra/ci.nix

18 lines
835 B
Nix
Raw Normal View History

2020-04-18 00:12:32 +02:00
# Add derivations to be built from the cache to this file
2021-12-23 21:15:46 +01:00
{ system ? builtins.currentSystem
, src ? { ref = null; }
}:
2020-04-18 00:12:32 +02:00
let
2022-04-10 22:29:46 +02:00
self = builtins.getFlake (toString ./.);
terraform = builtins.getFlake (toString ./terraform/.);
2023-03-10 22:15:05 +10:00
inherit (self.inputs.nixpkgs) lib;
stripDomain = name: lib.head (builtins.match "(.*).nix-community.org" name);
2020-04-18 00:12:32 +02:00
in
2023-03-10 22:15:05 +10:00
(lib.mapAttrs' (name: config: lib.nameValuePair "nixos-${stripDomain name}" config.config.system.build.toplevel) self.outputs.nixosConfigurations) //
2022-09-27 22:50:12 +02:00
{
# FIXME: maybe find a more generic solution here?
devShell-x86_64 = self.outputs.devShells.x86_64-linux.default;
devShell-aarch64 = self.outputs.devShells.aarch64-linux.default;
devShell-terraform-x86_64 = terraform.outputs.devShells.x86_64-linux.default;
} // self.outputs.checks.x86_64-linux # mainly for treefmt at the moment...