diff --git a/.envrc b/.envrc index 4b57f8f..5c974c6 100644 --- a/.envrc +++ b/.envrc @@ -1,5 +1,6 @@ -if [ -z "${name}" ]; then +if [ -z "${NIX_ENV_LOADED}" ]; then echo "entering dev environment..." + export NIX_ENV_LOADED=$(pwd) nix develop \ --ignore-environment \ @@ -15,24 +16,22 @@ if [ -z "${name}" ]; then --keep AWS_SECRET_ACCESS_KEY \ --keep AWS_SESSION_TOKEN \ --keep TERM \ + --keep NIX_ENV_LOADED \ $(pwd) else echo "setting up dev environment..." - source .aliases source .functions source .variables source .rcs -fi -if [ -z "$SSH_AUTH_SOCK" ]; then - echo "Unable to find SSH_AUTH_SOCK, is your agent running?"; -fi -if [ -z "$(ssh-add -l | grep -v 'The agent has no identities.')" ]; then - echo "Your agent doesn't appear to have any identities loaded, please load a key or forward your agent."; -fi -if [ -z "$(env | grep 'AWS')" ]; then - echo "Unable to find AWS authentication information in the environment, please make sure you authenticate with AWS."; -fi -if [ -z "$(env | grep 'GITHUB_TOKEN')" ]; then - echo "Unable to find GITHUB authentication information in the environment, please make sure you authenticate with GITHUB."; + source .aliases + + if [ -z "$SSH_AUTH_SOCK" ]; then eval $(ssh-agent -s); fi + + if [ -z "$(env | grep 'AWS')" ]; then + echo "Unable to find AWS authentication information in the environment, please make sure you authenticate with AWS."; + fi + if [ -z "$(env | grep 'GITHUB_TOKEN')" ]; then + echo "Unable to find GITHUB authentication information in the environment, please make sure you authenticate with GITHUB."; + fi fi diff --git a/.rcs b/.rcs index fb07861..e327e42 100644 --- a/.rcs +++ b/.rcs @@ -1,2 +1,3 @@ source ~/.config/aws/default/rc # add personal aws auth vars -source ~/.config/alias/default/rc # add personal aliases \ No newline at end of file +source ~/.config/alias/default/rc # add personal aliases +source ~/.config/github/default/rc # add personal github auth vars \ No newline at end of file diff --git a/modules/vpc/main.tf b/modules/vpc/main.tf index 9b3d6f6..20cfb65 100644 --- a/modules/vpc/main.tf +++ b/modules/vpc/main.tf @@ -20,11 +20,6 @@ resource "aws_vpc" "new" { Name = local.name } assign_generated_ipv6_cidr_block = true - lifecycle { - ignore_changes = [ - default_network_acl_id, - ] - } } resource "aws_internet_gateway" "new" {