feat(shell): nf-lint-tf

This commit is contained in:
arcnmx 2024-01-16 11:02:55 -08:00
parent 47d1036c42
commit 4de65230b4
5 changed files with 26 additions and 5 deletions

View file

@ -19,7 +19,15 @@ let
exec nix flake update "$@"
'';
nf-deploy = pkgs.writeShellScriptBin "nf-deploy" ''
exec nix run ''${FLAKE_OPTS-} ''$NF_CONFIG_ROOT#nf-deploy -- "$@"
exec nix run ''${FLAKE_OPTS-} "$NF_CONFIG_ROOT#nf-deploy" -- "$@"
'';
nf-tf = pkgs.writeShellScriptBin "nf-tf" ''
cd "$NF_CONFIG_ROOT/tf"
exec nix run ''${FLAKE_OPTS-} "$NF_CONFIG_ROOT#terraform" -- "$@"
'';
nf-lint-tf = pkgs.writeShellScriptBin "nf-lint-tf" ''
cd "$NF_CONFIG_ROOT/tf"
exec nix run ''${FLAKE_OPTS-} "$NF_CONFIG_ROOT#nf-lint-tf" -- "$@"
'';
in
pkgs.mkShell {
@ -30,6 +38,8 @@ pkgs.mkShell {
nf-actions-test
nf-update
nf-deploy
nf-tf
nf-lint-tf
];
shellHook = ''
export NIX_BIN_DIR=$(dirname $(readlink -f $(type -P nix)))