forked from aylac.top/nixcfg
this repo has no description
at main 3.2 kB view raw
1{ 2 pkgs, 3 config, 4 lib, 5 ... 6}: { 7 imports = [ 8 ./gnome 9 ./plasma 10 ./cosmic 11 ]; 12 13 options.myNixOS.desktop.enable = lib.mkOption { 14 default = 15 config.myNixOS.desktop.gnome.enable or config.myNixOS.desktop.hyprland.enable 16 or config.myNixOS.desktop.kde.enable; 17 description = "Desktop environment configuration."; 18 type = lib.types.bool; 19 }; 20 21 config = lib.mkIf config.myNixOS.desktop.enable { 22 boot = { 23 consoleLogLevel = 0; 24 initrd.verbose = false; 25 plymouth.enable = true; 26 }; 27 28 environment = { 29 sessionVariables.NIXOS_OZONE_WL = "1"; 30 31 # stem darkening for prettier fonts 32 variables = { 33 FREETYPE_PROPERTIES = "autofitter:no-stem-darkening=0 autofitter:darkening-parameters=500,0,1000,500,2500,500,4000,0 cff:no-stem-darkening=0 type1:no-stem-darkening=0 t1cid:no-stem-darkening=0"; 34 QT_NO_SYNTHESIZED_BOLD = 1; 35 }; 36 }; 37 38 # other font settings 39 fonts = { 40 fontconfig = { 41 enable = true; 42 includeUserConf = true; 43 subpixel = { 44 lcdfilter = "none"; 45 rgba = "none"; 46 }; 47 antialias = true; 48 hinting = { 49 enable = true; 50 style = "slight"; 51 autohint = false; 52 }; 53 54 # have i told you how much i despise fontconfig. literally zero reason to pick bitmap fonts over noto fonts but it always does. 55 localConf = '' 56 <?xml version="1.0"?> 57 <!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd"> 58 <fontconfig> 59 <description>Reject bitmap fonts except bitmap emoji fonts</description> 60 <!-- Reject bitmap fonts --> 61 <selectfont> 62 <rejectfont> 63 <pattern> 64 <patelt name="outline"><bool>false</bool></patelt> 65 <patelt name="scalable"><bool>false</bool></patelt> 66 </pattern> 67 </rejectfont> 68 </selectfont> 69 </fontconfig> 70 ''; 71 }; 72 73 packages = with pkgs; [ 74 noto-fonts 75 noto-fonts-cjk-sans 76 noto-fonts-emoji 77 noto-fonts-color-emoji 78 nerd-fonts.jetbrains-mono 79 ]; 80 }; 81 82 home-manager.sharedModules = [ 83 { 84 config.myHome.desktop.enable = true; 85 } 86 ]; 87 88 programs.system-config-printer.enable = true; 89 90 services = { 91 avahi = { 92 enable = true; 93 nssmdns4 = true; 94 openFirewall = true; 95 96 publish = { 97 enable = true; 98 addresses = true; 99 userServices = true; 100 workstation = true; 101 }; 102 }; 103 104 gnome.gnome-keyring.enable = true; 105 gvfs.enable = true; # Mount, trash, etc. 106 libinput.enable = true; 107 108 pipewire = { 109 enable = true; 110 111 alsa = { 112 enable = true; 113 support32Bit = true; 114 }; 115 116 pulse.enable = true; 117 }; 118 119 printing.enable = false; 120 121 pulseaudio = { 122 support32Bit = true; 123 }; 124 125 system-config-printer.enable = true; 126 127 xserver = { 128 enable = true; 129 excludePackages = with pkgs; [xterm]; 130 }; 131 }; 132 133 system.nixos.tags = ["desktop"]; 134 }; 135}