|
|
|
|
|
by noplacelikehome
462 days ago
|
|
One neat Nix feature is development shells, which let you define isolated shell environments that can be activated by invoking `nix develop` (or via direnv upon entering a directory): devShells.default = pkgs.mkShell {
packages = with pkgs; [ opentofu terragrunt ];
};
I can then use these tools inside the devShell from my jobs like so: jobs:
terragrunt-plan:
runs-on: [self-hosted, Linux, X64]
defaults:
run:
shell: nix develop --command bash -e {0}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Plan
run: terragrunt --terragrunt-non-interactive run-all plan
Since I'm doing this within a Nix flake all of the dependencies for this environment are recorded in a lock file. Provided my clone of the repo is up to date I should have the same versions. |
|