feat: NixOS + darwin equality. feat: vim overhaul.

This commit is contained in:
Kat Inskip 2022-07-08 14:12:02 -07:00 committed by kat
parent 5879913b51
commit 2606e1d874
Signed by: kat
GPG key ID: 465E64DECEA8CF0F
48 changed files with 463 additions and 918 deletions

View file

@ -90,12 +90,12 @@ with lib; {
command =
let
main = (import ../.);
hosts = main.network.nodes;
nodes = main.network.nodes.nixos;
targets = main.deploy.targets;
enabledTargets = filterAttrs (_: v: v.enable) main.deploy.targets;
enabledHosts = concatLists (mapAttrsToList (targetName: target: target.nodeNames) enabledTargets);
filteredHosts = subtractLists [ "daiyousei" "shinmyoumaru" "medicine" ] enabledHosts;
hostBuildString = concatMapStringsSep " && " (host: "nix build -Lf . network.nodes.${host}.deploy.system -o result-${host} && nix-collect-garbage -d") filteredHosts;
nodeBuildString = concatMapStringsSep " && " (node: "nix build -Lf . network.nodes.nixos.${node}.deploy.system -o result-${node} && nix-collect-garbage -d") filteredHosts;
in
''
# ${toString builtins.currentTime}
@ -110,7 +110,7 @@ with lib; {
if git status --porcelain | grep -qF flake.lock; then
git -P diff flake.lock
echo "checking that network.nodes.still build..." >&2
if ${hostBuildString}; then
if ${nodeBuildString}; then
if [[ -n $CACHIX_SIGNING_KEY ]]; then
cachix push kittywitch result*/ &
CACHIX_PUSH=$!

View file

@ -51,13 +51,13 @@
jobs =
let
main = (import ../.);
hosts = main.network.nodes;
hosts = main.network.nodes.nixos;
targets = main.deploy.targets;
enabledTargets = filterAttrs (k: v: v.enable && k != "medicine") main.deploy.targets;
enabledHosts = concatLists (mapAttrsToList (targetName: target: target.nodeNames) enabledTargets);
in
mapAttrs' (k: nameValuePair "${k}") (genAttrs enabledHosts (host: {
tasks.${host}.inputs = channels.nixfiles.network.nodes.${host}.deploy.system;
tasks.${host}.inputs = channels.nixfiles.network.nodes.nixos.${host}.deploy.system;
}));
ci.gh-actions.checkoutOptions.submodules = false;