From cf58bf4959326ab2866de492ba8d34bbd5066d88 Mon Sep 17 00:00:00 2001 From: Username404-59 Date: Tue, 30 Jun 2026 21:41:03 +0200 Subject: [PATCH] Create ananicy.nix and put some extra rules in it To make compilation not hurt everything else --- configuration.nix | 1 + modules/ananicy.nix | 49 +++++++++++++++++++++++++++++++++++++ modules/system-packages.nix | 6 ----- 3 files changed, 50 insertions(+), 6 deletions(-) create mode 100644 modules/ananicy.nix diff --git a/configuration.nix b/configuration.nix index d96ed48..4312ecd 100644 --- a/configuration.nix +++ b/configuration.nix @@ -67,6 +67,7 @@ in ./modules/networking.nix ./modules/mesa.nix ./modules/audio.nix + ./modules/ananicy.nix # ISO installer building stuff: ./ISO/iso.nix diff --git a/modules/ananicy.nix b/modules/ananicy.nix new file mode 100644 index 0000000..9347fea --- /dev/null +++ b/modules/ananicy.nix @@ -0,0 +1,49 @@ +{ pkgs, ... }: + +{ + services.ananicy = { + enable = true; + package = pkgs.ananicy-cpp; + rulesProvider = pkgs.ananicy-rules-cachyos; + + extraTypes = [ + { type = "Compiler"; nice = 13; latency_nice = 13; } + ]; + + extraRules = [ + # C/C++ etc + { name = "clang"; type = "Compiler"; } + { name = "clang++"; type = "Compiler"; } + { name = "cmake"; type = "Compiler"; } + { name = "gcc"; type = "Compiler"; } + { name = "g++"; type = "Compiler"; } + { name = "make"; type = "Compiler"; } + + # Go + { name = "go"; type = "Compiler"; } + + # Java + { name = "java"; type = "Compiler"; } + { name = "javac"; type = "Compiler"; } + + # Rust + { name = "cargo"; type = "Compiler"; } + { name = "rustc"; type = "Compiler"; } + { name = "rust-analyzer"; type = "Compiler"; } + + # Linkers + { name = "lld"; type = "Compiler"; } + { name = "mold"; type = "Compiler"; } + { name = "ld"; type = "Compiler"; } + { name = "ld.bfd"; type = "Compiler"; } + { name = "ld.mold"; type = "Compiler"; } + { name = "ld.lld"; type = "Compiler"; } + { name = "lto1-ltrans"; type = "Compiler"; } + + # Build systems + { name = "bazel"; type = "Compiler"; } + { name = "ninja"; type = "Compiler"; } + { name = "meson"; type = "Compiler"; } + ]; + }; +} \ No newline at end of file diff --git a/modules/system-packages.nix b/modules/system-packages.nix index 591f3ab..f3b445b 100644 --- a/modules/system-packages.nix +++ b/modules/system-packages.nix @@ -74,12 +74,6 @@ in capSysNice = true; }; - services.ananicy = { - enable = true; - package = pkgs.ananicy-cpp; - rulesProvider = pkgs.ananicy-rules-cachyos; - }; - services.flatpak.enable = true; systemd.user.services.flatpak-repos = { after = [ "network.target" ];