mirror of
				https://github.com/Jokiller230/puzzlevision.git
				synced 2025-10-31 13:50:04 +00:00 
			
		
		
		
	✨ Merge palette option into main Catppuccin home module config
This commit is contained in:
		
							parent
							
								
									2f5395dc64
								
							
						
					
					
						commit
						01b1273012
					
				
					 1 changed files with 7 additions and 1 deletions
				
			
		|  | @ -1,6 +1,7 @@ | |||
| { | ||||
|   lib, | ||||
|   self, | ||||
|   pkgs, | ||||
|   config, | ||||
|   osConfig, | ||||
|   namespace, | ||||
|  | @ -9,12 +10,15 @@ | |||
|   inherit (lib) mkEnableOption types mkIf; | ||||
|   inherit (self.lib) mkOpt; | ||||
| 
 | ||||
|   palette = (pkgs.lib.importJSON (config.catppuccin.sources.palette + "/palette.json")).${config.catppuccin.flavor}.colors; | ||||
| 
 | ||||
|   cfg = config.${namespace}.themes.catppuccin; | ||||
| in { | ||||
|   options.${namespace}.themes.catppuccin = { | ||||
|     enable = mkEnableOption "the Catppuccin theme, globally."; | ||||
|     accent = mkOpt types.str "blue" "The accent colour to use."; | ||||
|     flavor = mkOpt types.str "macchiato" "The flavor to use."; | ||||
|     palette = mkOpt (lib.types.attrsOf lib.types.raw) palette "a reference to the current active Catppuccin palette."; | ||||
|   }; | ||||
| 
 | ||||
|   config = mkIf cfg.enable { | ||||
|  | @ -28,6 +32,8 @@ in { | |||
|       cursors.flavor = cfg.flavor; | ||||
|     }; | ||||
| 
 | ||||
|     ${namespace}.themes.catppuccin.gtk.enable = mkIf osConfig.${namespace}.desktop.gnome.enable true; | ||||
|     ${namespace}.themes.catppuccin = { | ||||
|       gtk.enable = mkIf osConfig.${namespace}.desktop.gnome.enable true; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue