mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 12:29:19 -08:00
feat(shell): nf-lint-tf
This commit is contained in:
parent
47d1036c42
commit
4de65230b4
5 changed files with 26 additions and 5 deletions
|
|
@ -1,10 +1,13 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.options) mkOption;
|
||||
inherit (lib.types) attrsOf package;
|
||||
inherit (lib.meta) getExe;
|
||||
cfg = config.outputs.packages;
|
||||
in {
|
||||
options.outputs.packages = mkOption {
|
||||
type = attrsOf package;
|
||||
|
|
@ -12,8 +15,13 @@ in {
|
|||
};
|
||||
|
||||
config.outputs.packages = {
|
||||
inherit (pkgs.buildPackages) terraform tflint;
|
||||
nf-deploy = pkgs.writeShellScriptBin "nf-deploy" ''
|
||||
exec ${pkgs.runtimeShell} ${../../ci/deploy.sh} "$@"
|
||||
'';
|
||||
nf-lint-tf = pkgs.writeShellScriptBin "nf-lint-tf" ''
|
||||
${getExe cfg.terraform} fmt "$@" &&
|
||||
${cfg.tflint}/bin/tflint
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue