Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add integration with nixpkgs-terraform #5

Closed
wants to merge 7 commits into from

Conversation

oscar-izval
Copy link
Collaborator

@oscar-izval oscar-izval commented Nov 16, 2023

This PR adds integration with nixpkgs-terraform. To test this:

  1. Copy this demo config for devenv and change <abs-path-to-devenv-clone> to the absolute path of your local checkout of this branch (with three /):
{
  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05";
    systems.url = "github:nix-systems/default";
    devenv.url = "git+file://<abs-path-to-devenv-clone>?ref=add-nixpkgs-terraform";
    nixpkgs-terraform.url = "github:stackbuilders/nixpkgs-terraform";
  };

  nixConfig = {
    extra-trusted-public-keys = "devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw= nixpkgs-terraform.cachix.org-1:8Sit092rIdAVENA3ZVeH9hzSiqI/jng6JiCrQ1Dmusw=";
    extra-substituters = "https://devenv.cachix.org https://nixpkgs-terraform.cachix.org";
  };

  outputs = { self, nixpkgs, devenv, systems, ... } @ inputs:
    let
      forEachSystem = nixpkgs.lib.genAttrs (import systems);
    in
    {
      devShells = forEachSystem
        (system:
          let
            pkgs = nixpkgs.legacyPackages.${system};
          in
          {
            default = devenv.lib.mkShell {
              inherit inputs pkgs;
              modules = [
                {
                  languages.terraform.enable = true;
                  languages.terraform.version = "1.7.0";
                }
              ];
            };
          });
    };
}
  1. Run NIXPKGS_ALLOW_UNFREE=1 nix develop --impure and play around setting different versions

@sestrella sestrella changed the base branch from sync-fork to main November 16, 2023 01:37
@oscar-izval oscar-izval marked this pull request as draft November 16, 2023 09:55
@oscar-izval oscar-izval force-pushed the add-nixpkgs-terraform branch from e6d9952 to c07ba84 Compare February 21, 2024 22:54
@oscar-izval oscar-izval force-pushed the add-nixpkgs-terraform branch from 60ada93 to c3a04d0 Compare March 10, 2024 19:58
@oscar-izval oscar-izval force-pushed the add-nixpkgs-terraform branch from 0c57244 to cf06566 Compare March 21, 2024 15:50
@sestrella sestrella closed this Apr 5, 2024
@sestrella sestrella deleted the add-nixpkgs-terraform branch April 5, 2024 02:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants