new profile catagory: theme. refactor modules for wallpaper, fonts, gtk, and qt. adjusted modules that depend on old theming modules
		
			
				
	
	
		
			40 lines
		
	
	
	
		
			889 B
		
	
	
	
		
			Nix
		
	
	
	
	
	
			
		
		
	
	
			40 lines
		
	
	
	
		
			889 B
		
	
	
	
		
			Nix
		
	
	
	
	
	
{ lib, config, pkgs, ... }:
 | 
						|
 | 
						|
let
 | 
						|
  mkFontOption = kind: {
 | 
						|
    family = lib.mkOption {
 | 
						|
      type = lib.types.str;
 | 
						|
      default = "";
 | 
						|
      description = "Family name for ${kind} font profile";
 | 
						|
      example = "Fira Code";
 | 
						|
    };
 | 
						|
    package = lib.mkOption {
 | 
						|
      type = lib.types.package;
 | 
						|
      default = null;
 | 
						|
      description = "Package for ${kind} font profile";
 | 
						|
      example = "pkgs.fira-code";
 | 
						|
    };
 | 
						|
  };
 | 
						|
  cfg = config.homeModules.theme.fonts;
 | 
						|
in
 | 
						|
{
 | 
						|
  options.homeModules.theme.fonts = {
 | 
						|
    enable = lib.mkEnableOption "Whether to enable font profiles";
 | 
						|
    monospace = mkFontOption "monospace";
 | 
						|
    regular = mkFontOption "regular";
 | 
						|
  };
 | 
						|
 | 
						|
 | 
						|
  config = lib.mkIf cfg.enable {
 | 
						|
    fonts.fontconfig.enable = true;
 | 
						|
    home.packages = [ 
 | 
						|
      cfg.monospace.package
 | 
						|
      cfg.regular.package
 | 
						|
 | 
						|
      pkgs.noto-fonts
 | 
						|
      pkgs.noto-fonts-cjk
 | 
						|
      pkgs.noto-fonts-emoji
 | 
						|
   ];
 | 
						|
  };
 | 
						|
}
 | 
						|
 |