mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 20:39:18 -08:00
deploy cleanup
This commit is contained in:
parent
8f611f02be
commit
81f98593a2
3 changed files with 26 additions and 24 deletions
|
|
@ -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"
|
||||
'';
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue