Skip to content

Instantly share code, notes, and snippets.

@nerzhul
Created June 23, 2023 08:46
Show Gist options
  • Save nerzhul/0efd6f1927a5756775004524efaca358 to your computer and use it in GitHub Desktop.
Save nerzhul/0efd6f1927a5756775004524efaca358 to your computer and use it in GitHub Desktop.
devenv
{ pkgs, ... }:
{
# https://devenv.sh/packages/
packages = [
pkgs.git
pkgs.direnv
pkgs.starship
pkgs.kubectl
pkgs.bash-completion
(pkgs.terragrunt.overrideAttrs (attrs: {
version = "0.46.3";
}))
];
enterShell = ''
git --version
terraform -v
[[ "$(which terragrunt)" != "" ]] && terragrunt -v || echo "You must install terragrunt, it's required here."
[[ "$(which vim)" != "" ]] && alias vi=vim
[[ "$(which starship)" != "" ]] && eval "$(starship init bash)"
source $DEVENV_PROFILE/etc/profile.d/bash_completion.sh
'';
# https://devenv.sh/languages/
languages.nix.enable = true;
languages.terraform = {
enable = true;
package = (pkgs.terraform.overrideAttrs (attrs: {
version = "1.5.0";
}));
};
# https://devenv.sh/pre-commit-hooks/
pre-commit.hooks.shellcheck.enable = true;
pre-commit.hooks.markdownlint.enable = true;
pre-commit.hooks.terraform-format.enable = true;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment