Skip to content

Commit

Permalink
feat: Move binary cache configs to new shared lib
Browse files Browse the repository at this point in the history
  • Loading branch information
lpchaim committed Jul 2, 2024
1 parent c684e07 commit fbbd6b9
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 13 deletions.
17 changes: 17 additions & 0 deletions lib/shared/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
shared = {
nix.settings = {
keep-outputs = true;
substituters = [
"https://nix-community.cachix.org"
"https://nyx.chaotic.cx"
"https://snowflakeos.cachix.org"
];
trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"chaotic-nyx.cachix.org-1:HfnXSw4pj95iI/n17rIDy40agHj12WfF+Gqk6SonIT8"
"snowflakeos.cachix.org-1:gXb32BL86r9bw1kBiw9AJuIkqN49xBvPd1ZW8YlqO70="
];
};
};
}
2 changes: 2 additions & 0 deletions modules/home/base/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

with lib;
let
inherit (lib.lpchaim) shared;
namespace = [ "my" "modules" ];
cfg = getAttrFromPath namespace config;
in
Expand All @@ -22,5 +23,6 @@ in
gui.enable = mkDefault false;
};
programs.home-manager.enable = mkDefault true;
nix.settings = shared.nix.settings;
};
}
15 changes: 2 additions & 13 deletions modules/nixos/base/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

let
inherit (lib) mkDefault;
inherit (lib.lpchaim) shared;
getFileSystemsByFsType = fsType:
lib.filterAttrs (_: fs: fs.fsType == fsType) config.fileSystems;
in
Expand Down Expand Up @@ -46,19 +47,7 @@ in
extraOptions = ''
experimental-features = flakes nix-command
'';
settings = {
keep-outputs = true;
substituters = [
"https://nix-community.cachix.org"
"https://nyx.chaotic.cx"
"https://snowflakeos.cachix.org"
];
trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"chaotic-nyx.cachix.org-1:HfnXSw4pj95iI/n17rIDy40agHj12WfF+Gqk6SonIT8"
"snowflakeos.cachix.org-1:gXb32BL86r9bw1kBiw9AJuIkqN49xBvPd1ZW8YlqO70="
];
};
settings = shared.nix.settings;
gc = {
automatic = true;
dates = "weekly";
Expand Down

0 comments on commit fbbd6b9

Please sign in to comment.