# hrm.ci instance for hrm itself: builds every host whose # systems/HOSTNAME/spec.nix has `ci = true;`. # # krops.nix finds everything except hrm through $HOME, so the importing host # provides the rest with hrm.ci.instances.hrm.dependencies and .home, e.g. # dependencies."sync/src/krops".repo = "/var/lib/git/krops"; # dependencies."sync/src/stockholm".repo = "/var/lib/git/stockholm"; { config, lib, ... }: { hrm.ci.instances.hrm = { repo = lib.mkDefault "${config.krebs.git.dataDir}/hrm"; jobs = /* sh */ '' set -efu hosts=$(nix-instantiate --eval --strict --json --expr ' builtins.filter (name: (import (./systems + "/''${name}/spec.nix")).ci or false) (builtins.attrNames (builtins.readDir ./systems)) ') echo "$hosts" | jq -r '.[]' ''; build = /* sh */ '' nix-build krops.nix --no-out-link --argstr name "$1" -A build ''; }; }