mirror of
https://github.com/Username404-59/Dotfiles-NixOS.git
synced 2026-07-03 12:58:07 +02:00
Adapt functions.mkSpecial to work for rust packages + use SCX from git
This commit is contained in:
parent
8bf9ad43a0
commit
8a71e93ef6
@ -1,4 +1,4 @@
|
|||||||
{ config, pkgs, lib, isLaptop, nixtamal, ... }:
|
{ config, pkgs, lib, isLaptop, nixtamal, functions, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
boot.kernelParams = [
|
boot.kernelParams = [
|
||||||
@ -61,7 +61,16 @@
|
|||||||
services.scx = { # https://wiki.cachyos.org/configuration/sched-ext/#general-recommendations
|
services.scx = { # https://wiki.cachyos.org/configuration/sched-ext/#general-recommendations
|
||||||
enable = true; # Disable this to use the infinity scheduler
|
enable = true; # Disable this to use the infinity scheduler
|
||||||
scheduler = "scx_flow";
|
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 = {
|
boot.kernel.sysctl = {
|
||||||
|
|||||||
@ -3,9 +3,14 @@
|
|||||||
let
|
let
|
||||||
functions = rec {
|
functions = rec {
|
||||||
mkSpecial = pkg: version: src_name: suffix:
|
mkSpecial = pkg: version: src_name: suffix:
|
||||||
pkg.overrideAttrs (old: {
|
let
|
||||||
inherit version;
|
|
||||||
src = nixtamal.${src_name + suffix};
|
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;
|
mkSpecialAuto = pkg: version: suffix: mkSpecial pkg version pkg.pname suffix;
|
||||||
mkSpecialVersion = pkg: version: mkSpecialAuto pkg version "";
|
mkSpecialVersion = pkg: version: mkSpecialAuto pkg version "";
|
||||||
|
|||||||
@ -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-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-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":[]}
|
,"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":[]}
|
,"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":{
|
,"p":{
|
||||||
|
|||||||
@ -183,6 +183,15 @@ inputs {
|
|||||||
url "https://github.com/micha4w/Hypr-DarkWindow/archive/refs/tags/v0.55.4.tar.gz"
|
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
|
// Patches
|
||||||
lact-patch { // TODO: Remove this when upstream releases a new version
|
lact-patch { // TODO: Remove this when upstream releases a new version
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user