mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-10 04:49:19 -08:00
27 lines
623 B
Nix
27 lines
623 B
Nix
{
|
|
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;
|
|
default = { };
|
|
};
|
|
|
|
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
|
|
'';
|
|
};
|
|
}
|