From c7fe0ddb1c1ed48757ef01ff3c59b6adf3508352 Mon Sep 17 00:00:00 2001 From: isabel Date: Wed, 1 Jan 2025 20:42:15 +0000 Subject: [PATCH] feat(global): cache.enable option --- docs/src/getting-started/stable-nix.md | 1 - modules/global.nix | 9 +++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/src/getting-started/stable-nix.md b/docs/src/getting-started/stable-nix.md index 5780f20c..12074e3e 100644 --- a/docs/src/getting-started/stable-nix.md +++ b/docs/src/getting-started/stable-nix.md @@ -91,4 +91,3 @@ or if you use a [standalone installation](https://nix-community.github.io/home-m } ``` - diff --git a/modules/global.nix b/modules/global.nix index 68a0c4d4..6be72741 100644 --- a/modules/global.nix +++ b/modules/global.nix @@ -45,5 +45,14 @@ in apply = lib.recursiveUpdate defaultSources; description = "Port sources used across all options"; }; + + cache.enable = lib.mkEnableOption "Enable Catppuccin cache"; + }; + + config = { + nix.settings = lib.mkIf config.catppuccin.cache.enable { + substituters = [ "https://catppuccin.cachix.org" ]; + trusted-public-keys = [ "catppuccin.cachix.org-1:noG/4HkbhJb+lUAdKrph6LaozJvAeEEZj4N732IysmU=" ]; + }; }; }