From 22bafc516556bffa2d46c4bb6e02472c1c8d39da Mon Sep 17 00:00:00 2001 From: seth Date: Mon, 13 May 2024 15:31:21 -0400 Subject: [PATCH] fix(modules): ensure default sources are applied to `catppuccin.sources` --- modules/home-manager/globals.nix | 3 +++ modules/nixos/globals.nix | 3 +++ test.nix | 17 +++++++++++++++-- 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/modules/home-manager/globals.nix b/modules/home-manager/globals.nix index 889b58d8..1c9b1f8e 100644 --- a/modules/home-manager/globals.nix +++ b/modules/home-manager/globals.nix @@ -17,6 +17,9 @@ sources = lib.mkOption { type = lib.types.lazyAttrsOf lib.types.raw; default = defaultSources; + # HACK! + # without this, overriding one source will delete all others. -@getchoo + apply = lib.recursiveUpdate defaultSources; description = "Port sources used across all options"; }; }; diff --git a/modules/nixos/globals.nix b/modules/nixos/globals.nix index 889b58d8..1c9b1f8e 100644 --- a/modules/nixos/globals.nix +++ b/modules/nixos/globals.nix @@ -17,6 +17,9 @@ sources = lib.mkOption { type = lib.types.lazyAttrsOf lib.types.raw; default = defaultSources; + # HACK! + # without this, overriding one source will delete all others. -@getchoo + apply = lib.recursiveUpdate defaultSources; description = "Port sources used across all options"; }; }; diff --git a/test.nix b/test.nix index ab577dbe..8a309a50 100644 --- a/test.nix +++ b/test.nix @@ -1,7 +1,20 @@ -{ testers, home-manager }: +{ testers, fetchFromGitHub, home-manager }: let common = { - catppuccin.enable = true; + catppuccin = { + enable = true; + sources = { + # this is used to ensure that we are able to apply + # source overrides without breaking the other sources + palette = fetchFromGitHub { + owner = "catppuccin"; + repo = "palette"; + rev = "16726028c518b0b94841de57cf51f14c095d43d8"; # refs/tags/1.1.1~1 + hash = "sha256-qZjMlZFTzJotOYjURRQMsiOdR2XGGba8XzXwx4+v9tk="; + }; + }; + + }; }; # shorthand for enabling a module