Skip to content

Commit

Permalink
add cache, enable for sanctuary-router
Browse files Browse the repository at this point in the history
this allows us to pull from cachix for things that really want a binary
cache, like the router, which is super slow to build the kernel.
  • Loading branch information
DirectXMan12 committed Dec 28, 2024
1 parent 680baf7 commit 2dd67e2
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
2 changes: 2 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
./modules/utils/allowedUnfree-polyfill.nix
./modules/common
./modules/user-facing
./modules/cache
./systems/${name}
({ ... }: { networking.hostName = name; })
({ config, pkgs, lib, ... }: {
Expand Down Expand Up @@ -98,6 +99,7 @@
local.userFacing = false;
local.uefi = false;
local.networking = "systemd";
local.cache.enable = true;
};
};
};
Expand Down
21 changes: 21 additions & 0 deletions modules/cache/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{ config, lib, ... }:

with lib;
{
options = {
local.cache.enable = mkEnableOption "personal cachix binary cache";
};

config = mkIf (config.local.cache.enable) {
nix = {
settings = {
substituters = [
"https://directxman12.cachix.org"
];
trusted-public-keys = [
"directxman12.cachix.org-1:JSNhBrYD9cUW/afQzCPaEYtCJNIVhpJeO0ewTDP2j5U="
];
};
};
};
}

0 comments on commit 2dd67e2

Please sign in to comment.