deploy cleanup

This commit is contained in:
arcnmx 2023-03-11 13:36:51 -08:00
parent 8f611f02be
commit 81f98593a2
3 changed files with 26 additions and 24 deletions

View file

@ -7,20 +7,15 @@ let
inherit (lib.options) optional;
inherit (lib.attrsets) attrValues;
nf-actions = pkgs.writeShellScriptBin "nf-actions" ''
export START_DIR="$PWD"
cd "${toString ./.}"
export NF_CONFIG_ROOT=${toString ./.}/ci
NF_CONFIG_FILES=($NF_CONFIG_ROOT/{nodes,flake-cron}.nix)
for f in "''${NF_CONFIG_FILES[@]}"; do
echo $f
nix run --argstr config "$f" -f '${inputs.ci}' run.gh-actions-generate
done
cd $START_DIR
'';
nf-actions-test = pkgs.writeShellScriptBin "nf-actions-test" ''
export START_DIR="$PWD"
cd "${toString ./.}"
export NF_CONFIG_ROOT=${toString ./.}/ci
nix run --argstr config "$NF_CONFIG_ROOT/nodes.nix" -f '${inputs.ci}' job.tewi.test
'';
nf-update = pkgs.writeShellScriptBin "nf-update" ''
@ -30,7 +25,6 @@ let
fi
'';
nf-deploy = pkgs.writeShellScriptBin "nf-deploy" ''
export NF_CONFIG_ROOT=${toString ./.}
exec /usr/bin/env bash ${./nixos/deploy.sh} "$@"
'';
in
@ -48,7 +42,8 @@ pkgs.mkShell {
export HOME_UID=$(id -u)
export HOME_USER=$(id -un)
export CI_PLATFORM="impure"
export NIX_PATH="$NIX_PATH:home=${toString ./.}"
export NF_CONFIG_ROOT=''${NF_CONFIG_ROOT-${toString ./.}}
export NIX_PATH="$NIX_PATH:home=$NF_CONFIG_ROOT"
'';
}