Flake for my NixOS devices

Fix bluetooth persistence, more fonts

bwc9876.dev 11b15522 954a8c04

verified
+77 -55
+6 -34
homeModules/gdi.nix
··· 44 44 in 45 45 lib.mkIf config.cow.gdi.enable { 46 46 home.packages = with pkgs; [ 47 - fira-code 48 - fira-go 49 - nerd-fonts.symbols-only 50 - noto-fonts-color-emoji 51 - unifont 52 - liberation_ttf 53 - 54 47 alsa-utils 55 48 56 49 hyprCursorTheme ··· 60 53 wezterm 61 54 62 55 # Shell Components 56 + hyprpicker 63 57 hyprlock 64 58 hyprland-qtutils 65 59 ··· 82 76 hunspell 83 77 hunspellDicts.en_US-large 84 78 ]; 79 + 80 + fonts.fontconfig.enable = false; 85 81 86 82 wayland.windowManager.hyprland = { 87 83 systemd.enable = false; ··· 151 147 "4,swipe,move" 152 148 ]; 153 149 bind = let 154 - powerMenu = "rofi -modi 'p:${pkgs.rofi-power-menu}/bin/rofi-power-menu' -show p --symbols-font \"FiraMono Nerd Font Mono\""; 150 + powerMenu = "rofi -modi 'p:${pkgs.rofi-power-menu}/bin/rofi-power-menu' -show p"; 155 151 screenshot = "${pkgs.nushell}/bin/nu ${../res/screenshot.nu}"; 156 152 157 153 openTerminal = launchDesktopApp "org.wezfurlong.wezterm.desktop"; ··· 192 188 "SUPER SHIFT,left,movetoworkspace,r-1" 193 189 "SUPER SHIFT,right,movetoworkspace,r+1" 194 190 "SUPER,L,exec,pidof hyprlock || hyprlock --immediate" 195 - "SUPER,S,exec,${runCmd "rofi -show drun -icon-theme \"candy-icons\" -show-icons"}" 191 + "SUPER,S,exec,${runCmd "rofi -show drun -show-icons"}" 196 192 "SUPER SHIFT,E,exec,${runCmd "rofi -modi emoji -show emoji"}" 197 193 "SUPER SHIFT,D,exec,swaync-client -d" 198 194 "SUPER,Delete,exec,${runCmd powerMenu}" ··· 341 337 } 342 338 { 343 339 monitor = ""; 344 - text = ''cmd[update:30000] echo " $(date +"%A, %B %-d | %I:%M %p") | $(${pkgs.nushell}/bin/nu ${../res/bat_display.nu}) "''; 340 + text = ''cmd[update:30000] echo " $(date +"%A, %B %-d | %I:%M %p")$(${pkgs.nushell}/bin/nu ${../res/bat_display.nu}) "''; 345 341 color = "$text"; 346 342 font_size = 20; 347 343 font_family = "sans-serif"; ··· 398 394 }/bin/wayland-mpris-idle-inhibit --ignore "kdeconnect" --ignore "playerctld"''; 399 395 Restart = "on-failure"; 400 396 RestartSec = "10"; 401 - }; 402 - }; 403 - }; 404 - 405 - fonts = { 406 - fontconfig = { 407 - enable = true; 408 - antialiasing = true; 409 - defaultFonts = let 410 - mainFonts = [ 411 - "FiraGO" 412 - "Symbols Nerd Font" 413 - ]; 414 - in { 415 - serif = mainFonts; 416 - sansSerif = mainFonts; 417 - monospace = [ 418 - "Fira Code" 419 - "Symbols Nerd Font" 420 - ]; 421 - emoji = [ 422 - "Noto Color Emoji" 423 - "Symbols Nerd Font" 424 - ]; 425 397 }; 426 398 }; 427 399 };
+1 -1
homeModules/qmplay2.nix
··· 301 301 Background = true; 302 302 BackgroundColor = ''@Variant(\0\0\0\x43\x1\x88\x88\0\0\0\0\0\0\0\0)''; 303 303 Bold = false; 304 - FontName = "Fira Code"; 304 + FontName = "monospace"; 305 305 FontSize = 24; 306 306 LeftMargin = 15; 307 307 Outline = 1;
+2 -2
nixosConfigurations/installer.nix
··· 23 23 autologinUser = "root"; 24 24 fonts = [ 25 25 { 26 - name = "FiraMono Nerd Font Mono"; 27 - package = pkgs.nerd-fonts.fira-mono; 26 + name = "SauceCodePro Nerd Font Mono"; 27 + package = pkgs.nerd-fonts.sauce-code-pro; 28 28 } 29 29 ]; 30 30 };
+1
nixosModules/base.nix
··· 24 24 programs.ssh.startAgent = true; 25 25 documentation.man.generateCaches = false; 26 26 services.upower.enable = true; 27 + services.udisks2.enable = true; 27 28 28 29 boot.tmp.cleanOnBoot = lib.mkDefault true; 29 30 services.logind.settings.Login.RuntimeDirectorySize = lib.mkDefault "100M";
+52
nixosModules/fonts.nix
··· 1 + {...}: { 2 + pkgs, 3 + config, 4 + lib, 5 + ... 6 + }: { 7 + options.cow.fonts.enable = 8 + (lib.mkEnableOption "font management") 9 + // { 10 + default = config.cow.gdi.enable; 11 + }; 12 + 13 + config = lib.mkIf config.cow.fonts.enable { 14 + fonts = { 15 + enableDefaultPackages = true; 16 + packages = with pkgs; [ 17 + fira-code 18 + fira-go 19 + noto-fonts 20 + noto-fonts-lgc-plus 21 + noto-fonts-cjk-sans 22 + noto-fonts-cjk-serif 23 + nerd-fonts.symbols-only 24 + noto-fonts-color-emoji 25 + corefonts 26 + unifont 27 + liberation_ttf 28 + ]; 29 + fontconfig = { 30 + enable = true; 31 + defaultFonts = { 32 + serif = [ 33 + "Noto Serif" 34 + "Symbols Nerd Font" 35 + ]; 36 + sansSerif = [ 37 + "FiraGO" 38 + "Symbols Nerd Font" 39 + ]; 40 + monospace = [ 41 + "Fira Code" 42 + "Symbols Nerd Font" 43 + ]; 44 + emoji = [ 45 + "Noto Color Emoji" 46 + "Symbols Nerd Font" 47 + ]; 48 + }; 49 + }; 50 + }; 51 + }; 52 + }
+13 -16
nixosModules/gdi.nix
··· 12 12 13 13 config = lib.mkIf config.cow.gdi.enable { 14 14 environment = { 15 - systemPackages = with pkgs; [ 16 - hyprpicker 17 - uwsm 18 - ]; 15 + systemPackages = with pkgs; 16 + lib.mkIf config.cow.gdi.showGreet [ 17 + uwsm 18 + ]; 19 19 variables = { 20 20 NIXOS_OZONE_WL = "1"; 21 21 _JAVA_AWT_WM_NONEREPARENTING = "1"; ··· 37 37 38 38 services.greetd = lib.mkIf config.cow.gdi.showGreet { 39 39 enable = true; 40 - settings = { 41 - default_session = let 42 - greeting = ''--greeting "Authenticate into ${lib.toUpper config.networking.hostName}"''; 43 - deCmd = pkgs.writeScript "start-session.sh" '' 44 - #!/usr/bin/env sh 45 - exec uwsm start ${pkgs.hyprland}/share/wayland-sessions/hyprland.desktop 46 - ''; 47 - cmd = ''--cmd "systemd-inhibit --what=handle-power-key:handle-lid-switch ${deCmd}"''; 48 - in { 49 - command = "${pkgs.tuigreet}/bin/tuigreet --remember --time ${greeting} ${cmd}"; 50 - }; 51 - }; 40 + useTextGreeter = true; 41 + settings.default_session.command = let 42 + greeting = ''--greeting "Authenticate into ${lib.toUpper config.networking.hostName}"''; 43 + deCmd = pkgs.writeScript "start-session.sh" '' 44 + #!/usr/bin/env sh 45 + exec uwsm start ${pkgs.hyprland}/share/wayland-sessions/hyprland.desktop 46 + ''; 47 + cmd = ''--cmd "systemd-inhibit --what=handle-power-key:handle-lid-switch ${deCmd}"''; 48 + in "${pkgs.tuigreet}/bin/tuigreet --time ${greeting} ${cmd}"; 52 49 }; 53 50 }; 54 51 }
+1 -1
nixosModules/network.nix
··· 19 19 }; 20 20 21 21 cow.imperm.keepCache = 22 - (lib.optional config.cow.network.bluetooth "/var/lib/bluetooh") 22 + (lib.optional config.cow.network.bluetooth "/var/lib/bluetooth") 23 23 ++ (lib.optional config.cow.network.wireless "/var/lib/iwd"); 24 24 25 25 networking = lib.mkIf config.cow.network.wireless {
+1 -1
res/bat_display.nu
··· 43 43 $icons | get "default" | get $idx 44 44 } 45 45 46 - echo $"($icon) ($percent)󰏰" 46 + echo $" | ($icon) ($percent)󰏰"