Add cachix and enable by default

This commit is contained in:
NullBite 2024-02-19 07:14:50 +01:00
parent 225691d325
commit 46cbf68a5e
Signed by: nullbite
GPG Key ID: 6C4D545385D4925A
2 changed files with 24 additions and 0 deletions

23
system/cachix.nix Normal file
View File

@ -0,0 +1,23 @@
{ pkgs, lib, config, ... }:
let
cfg = config.nixfiles.cachix;
in
{
options.nixfiles.cachix.enable = lib.mkOption {
description = "Whether to enable the Cachix derivation cache";
type = lib.types.bool;
default = true;
example = false;
};
config = lib.mkIf cfg.enable {
nix.settings = {
substituters = [
"https://hyprland.cachix.org"
];
trusted-public-keys = [
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
];
};
};
}

View File

@ -11,6 +11,7 @@ in
./programs
./sessions
./testing
./cachix.nix
];
config = {};
options.nixfiles = {