nix machine / user configurations
1{ lib, ... }: 2let 3 l = lib // builtins; 4 mkRule = name: type: { 5 inherit name type; 6 }; 7in 8{ 9 services.ananicy = { 10 enable = true; 11 extraRules = [ 12 # coompilers 13 (mkRule "g++" "BG_CPUIO") 14 (mkRule "gcc" "BG_CPUIO") 15 (mkRule "clang" "BG_CPUIO") 16 (mkRule "mold" "BG_CPUIO") 17 (mkRule "ld" "BG_CPUIO") 18 (mkRule "gold" "BG_CPUIO") 19 (mkRule "rustc" "BG_CPUIO") 20 (mkRule "zig" "BG_CPUIO") 21 (mkRule "cargo" "BG_CPUIO") 22 (mkRule "rust-analyzer" "BG_CPUIO") 23 (mkRule "go" "BG_CPUIO") 24 (mkRule "nix" "BG_CPUIO") 25 (mkRule "nix-daemon" "BG_CPUIO") 26 # editors 27 (mkRule "hx" "Doc-View") 28 (mkRule ".hx-wrapped" "Doc-View") 29 # browser 30 (mkRule "firefox" "Doc-View") 31 (mkRule ".firefox-wrapped" "Doc-View") 32 (mkRule "chromium" "Doc-View") 33 (mkRule ".chromium-wrapped" "Doc-View") 34 # wm 35 (mkRule ".gnome-shell-wrapped" "LowLatency_RT") 36 (mkRule "gnome-shell" "LowLatency_RT") 37 (mkRule "Hyprland" "LowLatency_RT") 38 (mkRule "sway" "LowLatency_RT") 39 (mkRule ".sway-wrapped" "LowLatency_RT") 40 (mkRule "rofi" "LowLatency_RT") 41 (mkRule ".rofi-wrapped" "LowLatency_RT") 42 (mkRule "wlsunset" "BG_CPUIO") 43 (mkRule "swayidle" "BG_CPUIO") 44 # term 45 (mkRule "wezterm-gui" "Doc-View") 46 (mkRule "foot" "Doc-View") 47 (mkRule "gnome-terminal" "Doc-View") 48 (mkRule ".gnome-terminal-wrapped" "Doc-View") 49 # other 50 (mkRule "syncthing" "BG_CPUIO") 51 ]; 52 }; 53}