Skip to content

Commit

Permalink
flake.nix: add extra-substituters
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagokokada committed Oct 5, 2023
1 parent 5ea3d5c commit 4e5a3a1
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
14 changes: 14 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -236,5 +236,19 @@
'';
};
}))

{
# Allows the user to use our cache when using `nix run <thisFlake>`.
nixConfig = {
extra-substituters = [
"https://nix-community.cachix.org"
"https://thiagokokada-nix-configs.cachix.org"
];
extra-trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"thiagokokada-nix-configs.cachix.org-1:MwFfYIvEHsVOvUPSEpvJ3mA69z/NnY6LQqIQJFvNwOc="
];
};
}
]); # END recursiveMergeAttrs
}
13 changes: 2 additions & 11 deletions home-manager/meta/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ config, lib, pkgs, osConfig, ... }:
{ config, lib, pkgs, osConfig, flake, ... }:

{
imports = [
Expand All @@ -24,16 +24,7 @@
# sudo echo "trusted-users = @wheel" >> /etc/nix/nix.conf
nix = {
package = lib.mkDefault pkgs.nix;
settings = import ../../shared/nix-conf.nix // {
extra-substituters = [
"https://nix-community.cachix.org"
"https://thiagokokada-nix-configs.cachix.org"
];
extra-trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"thiagokokada-nix-configs.cachix.org-1:MwFfYIvEHsVOvUPSEpvJ3mA69z/NnY6LQqIQJFvNwOc="
];
};
settings = import ../../shared/nix-conf.nix // flake.outputs.nixConfig;
};

# Set custom nixpkgs config (e.g.: allowUnfree), both for this
Expand Down

0 comments on commit 4e5a3a1

Please sign in to comment.