diff --git a/modules/kernel.nix b/modules/kernel.nix index dc1c334..e082655 100644 --- a/modules/kernel.nix +++ b/modules/kernel.nix @@ -1,4 +1,4 @@ -{ config, pkgs, lib, isLaptop, nixtamal, ... }: +{ config, pkgs, lib, isLaptop, nixtamal, functions, ... }: { boot.kernelParams = [ @@ -61,7 +61,16 @@ services.scx = { # https://wiki.cachyos.org/configuration/sched-ext/#general-recommendations enable = true; # Disable this to use the infinity scheduler scheduler = "scx_flow"; - extraArgs = [ /* TODO for next scx version after 1.1.1: "--no-webui" */ ]; + extraArgs = [ "--no-webui" ]; + + package = (functions.mkUnstable pkgs.scx.rustscheds).overrideAttrs (old: { + buildInputs = old.buildInputs ++ [ pkgs.openssl /* <-- TODO: Remove when the package gets updated */ ]; + passthru = old.passthru // { + schedulers = [ # List of the schedulers in case there's some that didn't exist in last release + "scx_beerland" "scx_bpfland" "scx_cake" "scx_chaos" "scx_characterize" "scx_cosmos" "scx_flash" "scx_flow" "scx_forge" "scx_lavd" "scx_layered" "scx_mitosis" "scx_p2dq" "scx_pandemonium" "scx_rlfifo" "scx_rustland" "scx_rusty" "scx_tickless" + ]; + }; + }); }; boot.kernel.sysctl = { diff --git a/modules/system-packages.nix b/modules/system-packages.nix index c61e8e1..6a1c41a 100644 --- a/modules/system-packages.nix +++ b/modules/system-packages.nix @@ -3,9 +3,14 @@ let functions = rec { mkSpecial = pkg: version: src_name: suffix: - pkg.overrideAttrs (old: { - inherit version; + let src = nixtamal.${src_name + suffix}; + in pkg.overrideAttrs (old: { + inherit version src; + } // lib.optionalAttrs (old ? cargoDeps) { # Removes the need to set the cargo vendor hash (that nixtamal doesn't handle, obviously) + cargoDeps = pkgs.rustPlatform.importCargoLock { + lockFile = "${src}/Cargo.lock"; + }; }); mkSpecialAuto = pkg: version: suffix: mkSpecial pkg version pkg.pname suffix; mkSpecialVersion = pkg: version: mkSpecialAuto pkg version ""; diff --git a/tamal/lock.json b/tamal/lock.json index f7eee2b..463d618 100644 --- a/tamal/lock.json +++ b/tamal/lock.json @@ -19,6 +19,7 @@ ,"nix-citizen":{"sn":"nix-citizen-src","kd":[1,{"ft":0,"ur":"https://github.com/LovingMelody/nix-citizen/archive/7db41f8024ff84cc5ecc532560a5b6598ca65208.tar.gz","ms":[]}],"ha":{"al":2,"vl":"blake3-jcIN9/pmwil9YpwT/aG4/s4K7xUEcypAu7Kufbwi+lM="},"fv":"7db41f8024ff84cc5ecc532560a5b6598ca65208","ps":[]} ,"nix-gaming":{"sn":"nix-gaming-src","kd":[1,{"ft":0,"ur":"https://github.com/fufexan/nix-gaming/archive/0c07b30bc7bd15014db7154597b34ca12f60398c.tar.gz","ms":[]}],"ha":{"al":2,"vl":"blake3-+BQSCJm+H1Zf9ibHoqoUAz5cWF9XWzhZ/HjkbSnjjpI="},"fv":"0c07b30bc7bd15014db7154597b34ca12f60398c","ps":[]} ,"nix-spicetify":{"sn":"nix-spicetify-src","kd":[1,{"ft":0,"ur":"https://github.com/Gerg-L/spicetify-nix/archive/9cabea6f5973ec01f60080ea50f54f8f6d74dc95.tar.gz","ms":[]}],"ha":{"al":2,"vl":"blake3-EaKmJmkasj95Gwikyn07GPJqaERX7cBmxDD7N2Jl340="},"fv":"9cabea6f5973ec01f60080ea50f54f8f6d74dc95","ps":[]} +,"scx_rustscheds-git":{"sn":"scx_rustscheds-git-src","kd":[1,{"ft":0,"ur":"https://github.com/sched-ext/scx/archive/b911893af7f8ff8a971b47e99151c19115aa2be1.tar.gz","ms":[]}],"ha":{"al":2,"vl":"blake3-AjlWKsWbOzswLbA1NmnymZSTHMA0gT3V9Zn5WAQtgM8="},"fv":"b911893af7f8ff8a971b47e99151c19115aa2be1","ps":[]} ,"spotneotify":{"sn":"spotneotify-src","kd":[1,{"ft":0,"ur":"https://github.com/0lswitcher/spotneotify/archive/42a296482e28e6549baa5c31850ffafb7890a1a8.tar.gz","ms":[]}],"ha":{"al":2,"vl":"blake3-OgtK8Vh6JI2Y/iINgWU6URPPtpbGaNGSPXEoNWWH0lo="},"fv":"42a296482e28e6549baa5c31850ffafb7890a1a8","ps":[]} } ,"p":{ diff --git a/tamal/manifest.kdl b/tamal/manifest.kdl index 073b1d5..0b30c42 100644 --- a/tamal/manifest.kdl +++ b/tamal/manifest.kdl @@ -183,6 +183,15 @@ inputs { url "https://github.com/micha4w/Hypr-DarkWindow/archive/refs/tags/v0.55.4.tar.gz" } } + scx_rustscheds-git { + archive { + url "https://github.com/sched-ext/scx/archive/{{fresh_value}}.tar.gz" + } + fresh-cmd { + $ git ls-remote --branches "https://github.com/sched-ext/scx.git" --refs "refs/heads/main" + | cut -f1 + } + } // Patches lact-patch { // TODO: Remove this when upstream releases a new version