diff --git a/system/cachix.nix b/system/cachix.nix new file mode 100644 index 0000000..5c51c5d --- /dev/null +++ b/system/cachix.nix @@ -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=" + ]; + }; + }; +} diff --git a/system/default.nix b/system/default.nix index 036f8a4..f4aa1a7 100644 --- a/system/default.nix +++ b/system/default.nix @@ -11,6 +11,7 @@ in ./programs ./sessions ./testing + ./cachix.nix ]; config = {}; options.nixfiles = {