mirror of
				https://github.com/librephoenix/nixos-config
				synced 2025-10-31 07:54:00 +05:30 
			
		
		
		
	
		
			
				
	
	
		
			86 lines
		
	
	
	
		
			2.4 KiB
		
	
	
	
		
			Nix
		
	
	
	
	
	
			
		
		
	
	
			86 lines
		
	
	
	
		
			2.4 KiB
		
	
	
	
		
			Nix
		
	
	
	
	
	
| { config, lib, pkgs, theme, font, fontPkg, ... }:
 | |
| 
 | |
| let
 | |
|   themePath = "../../../themes"+("/"+theme+"/"+theme)+".yaml";
 | |
|   themePolarity = lib.removeSuffix "\n" (builtins.readFile (./. + "../../../themes"+("/"+theme)+"/polarity.txt"));
 | |
|   backgroundUrl = builtins.readFile (./. + "../../../themes"+("/"+theme)+"/backgroundurl.txt");
 | |
|   backgroundSha256 = builtins.readFile (./. + "../../../themes/"+("/"+theme)+"/backgroundsha256.txt");
 | |
| in
 | |
| {
 | |
|   home.file.".currenttheme".text = theme;
 | |
|   stylix.autoEnable = false;
 | |
|   stylix.polarity = themePolarity;
 | |
|   stylix.image = pkgs.fetchurl {
 | |
|     url = backgroundUrl;
 | |
|     sha256 = backgroundSha256;
 | |
|   };
 | |
|   stylix.base16Scheme = ./. + themePath;
 | |
| 
 | |
|   stylix.fonts = {
 | |
|     monospace = {
 | |
|       name = font;
 | |
|       package = fontPkg;
 | |
|     };
 | |
|     serif = {
 | |
|       name = font;
 | |
|       package = fontPkg;
 | |
|     };
 | |
|     sansSerif = {
 | |
|       name = font;
 | |
|       package = fontPkg;
 | |
|     };
 | |
|     emoji = {
 | |
|       name = "Noto Color Emoji";
 | |
|       package = pkgs.noto-fonts-emoji-blob-bin;
 | |
|     };
 | |
|     sizes = {
 | |
|       terminal = 18;
 | |
|       applications = 14;
 | |
|       popups = 12;
 | |
|       desktop = 12;
 | |
|     };
 | |
|   };
 | |
| 
 | |
|   stylix.targets.alacritty.enable = true;
 | |
|   stylix.targets.kitty.enable = true;
 | |
|   stylix.targets.gtk.enable = true;
 | |
|   stylix.targets.rofi.enable = true;
 | |
|   programs.rofi.enable = true;
 | |
|   stylix.targets.feh.enable = true;
 | |
|   programs.feh.enable = true;
 | |
|   home.file.".fehbg-stylix".text = ''
 | |
|     #!/bin/sh
 | |
|     feh --no-fehbg --bg-fill ''+
 | |
|   pkgs.fetchurl {
 | |
|     url = backgroundUrl;
 | |
|     sha256 = backgroundSha256;
 | |
|   }+'';
 | |
|   '';
 | |
|   home.file.".fehbg-stylix".executable = true;
 | |
|   home.file = {
 | |
|     ".config/qt5ct/colors/oomox-current.conf".source = config.lib.stylix.colors {
 | |
|       template = builtins.readFile ./oomox-current.conf.mustache;
 | |
|       extension = ".conf";
 | |
|     };
 | |
|     ".config/Trolltech.conf".source = config.lib.stylix.colors {
 | |
|       template = builtins.readFile ./Trolltech.conf.mustache;
 | |
|       extension = ".conf";
 | |
|     };
 | |
|     ".config/kdeglobals".source = config.lib.stylix.colors {
 | |
|       template = builtins.readFile ./Trolltech.conf.mustache;
 | |
|       extension = "";
 | |
|     };
 | |
|     ".config/qt5ct/qt5ct.conf".text = pkgs.lib.mkBefore (builtins.readFile ./qt5ct.conf);
 | |
|   };
 | |
|   home.packages = with pkgs; [
 | |
|      qt5ct pkgs.libsForQt5.breeze-qt5
 | |
|   ];
 | |
|   home.sessionVariables = {
 | |
|     QT_QPA_PLATFORMTHEME="qt5ct";
 | |
|   };
 | |
|   qt = {
 | |
|     enable = true;
 | |
|     style.package = pkgs.libsForQt5.breeze-qt5;
 | |
|     style.name = "breeze-dark";
 | |
|   };
 | |
| }
 | 
