Skip to content

Commit

Permalink
fix(modules): ensure default sources are applied to catppuccin.sources
Browse files Browse the repository at this point in the history
  • Loading branch information
getchoo committed May 13, 2024
1 parent c22eacf commit c3ce53e
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 2 deletions.
4 changes: 4 additions & 0 deletions modules/home-manager/globals.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
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";
};
};
Expand Down
4 changes: 4 additions & 0 deletions modules/nixos/globals.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
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";
};
};
Expand Down
17 changes: 15 additions & 2 deletions test.nix
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit c3ce53e

Please sign in to comment.