refactor(tazjin/nixos): Extract font configuration module
Change-Id: I067d832155db61fb426ea3435e038231f321f71a Reviewed-on: https://cl.tvl.fyi/c/depot/+/5545 Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su> Autosubmit: tazjin <tazjin@tvl.su>
This commit is contained in:
		
							parent
							
								
									dd2ae8552f
								
							
						
					
					
						commit
						155902744b
					
				
					 2 changed files with 25 additions and 19 deletions
				
			
		
							
								
								
									
										24
									
								
								users/tazjin/nixos/modules/fonts.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								users/tazjin/nixos/modules/fonts.nix
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,24 @@
 | 
				
			||||||
 | 
					# Attempt at configuring reasonable font-rendering.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					{ pkgs, ... }:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					  fonts = {
 | 
				
			||||||
 | 
					    fonts = with pkgs; [
 | 
				
			||||||
 | 
					      corefonts
 | 
				
			||||||
 | 
					      dejavu_fonts
 | 
				
			||||||
 | 
					      jetbrains-mono
 | 
				
			||||||
 | 
					      noto-fonts-cjk
 | 
				
			||||||
 | 
					      noto-fonts-emoji
 | 
				
			||||||
 | 
					    ];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    fontconfig = {
 | 
				
			||||||
 | 
					      hinting.enable = true;
 | 
				
			||||||
 | 
					      subpixel.lcdfilter = "light";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      defaultFonts = {
 | 
				
			||||||
 | 
					        monospace = [ "JetBrains Mono" ];
 | 
				
			||||||
 | 
					      };
 | 
				
			||||||
 | 
					    };
 | 
				
			||||||
 | 
					  };
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -15,6 +15,7 @@ lib.fix (self: {
 | 
				
			||||||
  imports = [
 | 
					  imports = [
 | 
				
			||||||
    (mod "open_eid.nix")
 | 
					    (mod "open_eid.nix")
 | 
				
			||||||
    (usermod "physical.nix")
 | 
					    (usermod "physical.nix")
 | 
				
			||||||
 | 
					    (usermod "fonts.nix")
 | 
				
			||||||
    "${depot.third_party.impermanence}/nixos.nix"
 | 
					    "${depot.third_party.impermanence}/nixos.nix"
 | 
				
			||||||
    "${pkgs.home-manager.src}/nixos"
 | 
					    "${pkgs.home-manager.src}/nixos"
 | 
				
			||||||
  ] ++ lib.optional (builtins.pathExists ./local-config.nix) ./local-config.nix;
 | 
					  ] ++ lib.optional (builtins.pathExists ./local-config.nix) ./local-config.nix;
 | 
				
			||||||
| 
						 | 
					@ -108,25 +109,6 @@ lib.fix (self: {
 | 
				
			||||||
    ];
 | 
					    ];
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  fonts = {
 | 
					 | 
				
			||||||
    fonts = with pkgs; [
 | 
					 | 
				
			||||||
      corefonts
 | 
					 | 
				
			||||||
      dejavu_fonts
 | 
					 | 
				
			||||||
      jetbrains-mono
 | 
					 | 
				
			||||||
      noto-fonts-cjk
 | 
					 | 
				
			||||||
      noto-fonts-emoji
 | 
					 | 
				
			||||||
    ];
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    fontconfig = {
 | 
					 | 
				
			||||||
      hinting.enable = true;
 | 
					 | 
				
			||||||
      subpixel.lcdfilter = "light";
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      defaultFonts = {
 | 
					 | 
				
			||||||
        monospace = [ "JetBrains Mono" ];
 | 
					 | 
				
			||||||
      };
 | 
					 | 
				
			||||||
    };
 | 
					 | 
				
			||||||
  };
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  environment.persistence."/persist" = {
 | 
					  environment.persistence."/persist" = {
 | 
				
			||||||
    directories = [
 | 
					    directories = [
 | 
				
			||||||
      "/etc/NetworkManager/system-connections"
 | 
					      "/etc/NetworkManager/system-connections"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue