Create ananicy.nix and put some extra rules in it

To make compilation not hurt everything else
This commit is contained in:
Username404-59 2026-06-30 21:41:03 +02:00
parent 3a495802b8
commit cf58bf4959
Signed by: Username404-59
GPG Key ID: F3A1878B14F5F0D7
3 changed files with 50 additions and 6 deletions

View File

@ -67,6 +67,7 @@ in
./modules/networking.nix ./modules/networking.nix
./modules/mesa.nix ./modules/mesa.nix
./modules/audio.nix ./modules/audio.nix
./modules/ananicy.nix
# ISO installer building stuff: # ISO installer building stuff:
./ISO/iso.nix ./ISO/iso.nix

49
modules/ananicy.nix Normal file
View File

@ -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"; }
];
};
}

View File

@ -74,12 +74,6 @@ in
capSysNice = true; capSysNice = true;
}; };
services.ananicy = {
enable = true;
package = pkgs.ananicy-cpp;
rulesProvider = pkgs.ananicy-rules-cachyos;
};
services.flatpak.enable = true; services.flatpak.enable = true;
systemd.user.services.flatpak-repos = { systemd.user.services.flatpak-repos = {
after = [ "network.target" ]; after = [ "network.target" ];