Skip to content

Commit

Permalink
Merge pull request #4 from tsandrini/add_defaults
Browse files Browse the repository at this point in the history
feat(templates): add additional sensible caches & update .envrc
  • Loading branch information
tsandrini authored Dec 18, 2023
2 parents f945927 + 10eb946 commit 6eb9599
Show file tree
Hide file tree
Showing 11 changed files with 51 additions and 15 deletions.
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ if ! has nix_direnv_version || ! nix_direnv_version 2.2.1; then
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/2.2.1/direnvrc" "sha256-zelF0vLbEl5uaqrfIzbgNzJWGmLzCmYAkInj/LNxvKs="
fi

nix_direnv_watch_file flake.nix
if ! use flake .#dev --impure
then
echo "devenv could not be built. The devenv environment was not loaded. Make the necessary changes to devenv.nix and hit enter to try again." >&2
Expand Down
1 change: 1 addition & 0 deletions templates/home/.envrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ if ! has nix_direnv_version || ! nix_direnv_version 2.2.1; then
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/2.2.1/direnvrc" "sha256-zelF0vLbEl5uaqrfIzbgNzJWGmLzCmYAkInj/LNxvKs="
fi

nix_direnv_watch_file parts/shells/devenv.nix
if ! use flake .#dev --impure
then
echo "devenv could not be built. The devenv environment was not loaded. Make the necessary changes to devenv.nix and hit enter to try again." >&2
Expand Down
12 changes: 9 additions & 3 deletions templates/home/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,19 @@
};
};

# Here you can add additional binary cache substituers that you trust
# Here you can add additional binary cache substituers that you trust.
# There are also some sensible default caches commented out that you
# might consider using.
nixConfig = {
extra-trusted-public-keys = [
"devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw="
# "devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw="
# "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
# "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
extra-substituters = [
"https://devenv.cachix.org"
# "https://devenv.cachix.org"
# "https://cache.nixos.org"
# "https://nix-community.cachix.org/"
];
};

Expand Down
1 change: 1 addition & 0 deletions templates/isolated-minimal/.envrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ if ! has nix_direnv_version || ! nix_direnv_version 2.2.1; then
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/2.2.1/direnvrc" "sha256-zelF0vLbEl5uaqrfIzbgNzJWGmLzCmYAkInj/LNxvKs="
fi

nix_direnv_watch_file nix/parts/shells/devenv.nix
if ! use flake .#dev --impure
then
echo "devenv could not be built. The devenv environment was not loaded. Make the necessary changes to devenv.nix and hit enter to try again." >&2
Expand Down
12 changes: 9 additions & 3 deletions templates/isolated-minimal/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,19 @@
# Project specific dependencies
};

# Here you can add additional binary cache substituers that you trust
# Here you can add additional binary cache substituers that you trust.
# There are also some sensible default caches commented out that you
# might consider using.
nixConfig = {
extra-trusted-public-keys = [
"devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw="
# "devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw="
# "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
# "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
extra-substituters = [
"https://devenv.cachix.org"
# "https://devenv.cachix.org"
# "https://cache.nixos.org"
# "https://nix-community.cachix.org/"
];
};

Expand Down
1 change: 1 addition & 0 deletions templates/isolated/.envrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ if ! has nix_direnv_version || ! nix_direnv_version 2.2.1; then
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/2.2.1/direnvrc" "sha256-zelF0vLbEl5uaqrfIzbgNzJWGmLzCmYAkInj/LNxvKs="
fi

nix_direnv_watch_file nix/parts/shells/devenv.nix
if ! use flake .#dev --impure
then
echo "devenv could not be built. The devenv environment was not loaded. Make the necessary changes to devenv.nix and hit enter to try again." >&2
Expand Down
12 changes: 9 additions & 3 deletions templates/isolated/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,19 @@
# Project specific dependencies
};

# Here you can add additional binary cache substituers that you trust
# Here you can add additional binary cache substituers that you trust.
# There are also some sensible default caches commented out that you
# might consider using.
nixConfig = {
extra-trusted-public-keys = [
"devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw="
# "devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw="
# "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
# "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
extra-substituters = [
"https://devenv.cachix.org"
# "https://devenv.cachix.org"
# "https://cache.nixos.org"
# "https://nix-community.cachix.org/"
];
};

Expand Down
1 change: 1 addition & 0 deletions templates/main/.envrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ if ! has nix_direnv_version || ! nix_direnv_version 2.2.1; then
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/2.2.1/direnvrc" "sha256-zelF0vLbEl5uaqrfIzbgNzJWGmLzCmYAkInj/LNxvKs="
fi

nix_direnv_watch_file parts/shells/devenv.nix
if ! use flake .#dev --impure
then
echo "devenv could not be built. The devenv environment was not loaded. Make the necessary changes to devenv.nix and hit enter to try again." >&2
Expand Down
12 changes: 9 additions & 3 deletions templates/main/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,19 @@
# Project specific dependencies
};

# Here you can add additional binary cache substituers that you trust
# Here you can add additional binary cache substituers that you trust.
# There are also some sensible default caches commented out that you
# might consider using.
nixConfig = {
extra-trusted-public-keys = [
"devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw="
# "devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw="
# "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
# "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
extra-substituters = [
"https://devenv.cachix.org"
# "https://devenv.cachix.org"
# "https://cache.nixos.org"
# "https://nix-community.cachix.org/"
];
};

Expand Down
1 change: 1 addition & 0 deletions templates/minimal/.envrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ if ! has nix_direnv_version || ! nix_direnv_version 2.2.1; then
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/2.2.1/direnvrc" "sha256-zelF0vLbEl5uaqrfIzbgNzJWGmLzCmYAkInj/LNxvKs="
fi

nix_direnv_watch_file parts/shells/devenv.nix
if ! use flake .#dev --impure
then
echo "devenv could not be built. The devenv environment was not loaded. Make the necessary changes to devenv.nix and hit enter to try again." >&2
Expand Down
12 changes: 9 additions & 3 deletions templates/minimal/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,19 @@
# Project specific dependencies
};

# Here you can add additional binary cache substituers that you trust
# Here you can add additional binary cache substituers that you trust.
# There are also some sensible default caches commented out that you
# might consider using.
nixConfig = {
extra-trusted-public-keys = [
"devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw="
# "devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw="
# "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
# "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
extra-substituters = [
"https://devenv.cachix.org"
# "https://devenv.cachix.org"
# "https://cache.nixos.org"
# "https://nix-community.cachix.org/"
];
};

Expand Down

0 comments on commit 6eb9599

Please sign in to comment.