nixos-servers/checks.nix

17 lines
532 B
Nix

{ self, nixpkgs, flake-utils, deploy-rs, ... }: flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
# Deploy-rs' flake checks seem broken for architectures different from the deployment machine.
# We skip these here.
checks = deploy-rs.lib.${system}.deployChecks (
pkgs.lib.attrsets.updateManyAttrsByPath [{
path = [ "nodes" ];
update = pkgs.lib.attrsets.filterAttrs (name: node:
self.machines.${name}.arch == system
);
}]
self.deploy
);
})