Revert "switch to mainline system76-scheduler module"
This partially reverts commit ac312dec98
.
New version seems to mess with my laptop quite a bit (it hangs at rmmod
kheaders and breaks suspend).
This commit is contained in:
parent
1d3876bdca
commit
b60e204f1e
|
@ -40,6 +40,7 @@ in
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
rofi-steam-game-list = callPackage ./rofi-steam-game-list { };
|
rofi-steam-game-list = callPackage ./rofi-steam-game-list { };
|
||||||
|
system76-scheduler = callPackage ./system76-scheduler.nix { };
|
||||||
techmino = callPackage ./techmino { };
|
techmino = callPackage ./techmino { };
|
||||||
|
|
||||||
firefox-addons = lib.recurseIntoAttrs (callPackage ./firefox-addons { inherit nur sources; });
|
firefox-addons = lib.recurseIntoAttrs (callPackage ./firefox-addons { inherit nur sources; });
|
||||||
|
|
65
pkgs/system76-scheduler.nix
Normal file
65
pkgs/system76-scheduler.nix
Normal file
|
@ -0,0 +1,65 @@
|
||||||
|
{ lib
|
||||||
|
, fetchFromGitHub
|
||||||
|
, writeText
|
||||||
|
, rustPlatform
|
||||||
|
, pkg-config
|
||||||
|
, dbus
|
||||||
|
, bcc
|
||||||
|
}:
|
||||||
|
|
||||||
|
rustPlatform.buildRustPackage {
|
||||||
|
pname = "system76-scheduler";
|
||||||
|
version = "unstable-2022-11-08";
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "pop-os";
|
||||||
|
repo = "system76-scheduler";
|
||||||
|
rev = "0fe4d8dfc4275fd856aee28ca942b9fa53229fc9";
|
||||||
|
sha256 = "sha256-uFFJkuMxqcGj6OQShF0zh/FGwX4/ln1l6NwGonkUsNI=";
|
||||||
|
};
|
||||||
|
cargoPatches = [(writeText "ron-rev.diff" ''
|
||||||
|
diff --git i/daemon/Cargo.toml w/daemon/Cargo.toml
|
||||||
|
index 0397788..fbd6202 100644
|
||||||
|
--- i/daemon/Cargo.toml
|
||||||
|
+++ w/daemon/Cargo.toml
|
||||||
|
@@ -33,7 +33,7 @@ clap = { version = "3.1.18", features = ["cargo"] }
|
||||||
|
# Necessary for deserialization of untagged enums in assignments.
|
||||||
|
[dependencies.ron]
|
||||||
|
git = "https://github.com/MomoLangenstein/ron"
|
||||||
|
-branch = "253-untagged-enums"
|
||||||
|
+rev = "afb960bb8b0402a79260533aa3b9d87a8abae72b"
|
||||||
|
|
||||||
|
[dependencies.tracing-subscriber]
|
||||||
|
version = "0.3.11"
|
||||||
|
diff --git i/Cargo.lock w/Cargo.lock
|
||||||
|
index a782756..fe56c1f 100644
|
||||||
|
--- i/Cargo.lock
|
||||||
|
+++ w/Cargo.lock
|
||||||
|
@@ -788,7 +788,7 @@ dependencies = [
|
||||||
|
[[package]]
|
||||||
|
name = "ron"
|
||||||
|
version = "0.8.0"
|
||||||
|
-source = "git+https://github.com/MomoLangenstein/ron?branch=253-untagged-enums#afb960bb8b0402a79260533aa3b9d87a8abae72b"
|
||||||
|
+source = "git+https://github.com/MomoLangenstein/ron?rev=afb960bb8b0402a79260533aa3b9d87a8abae72b#afb960bb8b0402a79260533aa3b9d87a8abae72b"
|
||||||
|
dependencies = [
|
||||||
|
"base64",
|
||||||
|
"bitflags",
|
||||||
|
'')];
|
||||||
|
cargoSha256 = "sha256-tY7o09Nu1/Lbn//5+iecUmV67Aw1QvVLdUaD8DDgKi0=";
|
||||||
|
cargoLock.lockFile = ./Cargo.lock;
|
||||||
|
cargoLock.outputHashes."ron-0.8.0" = "sha256-k+LuTEq97/DohcsulXoLXWqFLzPUzIR1D5pGru+M5Ew=";
|
||||||
|
nativeBuildInputs = [ pkg-config ];
|
||||||
|
buildInputs = [ dbus ];
|
||||||
|
EXECSNOOP_PATH = "${bcc}/bin/execsnoop";
|
||||||
|
postInstall = ''
|
||||||
|
install -D -m 0644 data/com.system76.Scheduler.conf $out/etc/dbus-1/system.d/com.system76.Scheduler.conf
|
||||||
|
mkdir -p $out/etc/system76-scheduler
|
||||||
|
install -D -m 0644 data/*.ron $out/etc/system76-scheduler/
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "System76 Scheduler";
|
||||||
|
homepage = "https://github.com/pop-os/system76-scheduler";
|
||||||
|
license = lib.licenses.mpl20;
|
||||||
|
platforms = [ "i686-linux" "x86_64-linux" ];
|
||||||
|
};
|
||||||
|
}
|
|
@ -195,7 +195,23 @@ in {
|
||||||
services.mullvad-vpn.package = pkgs.mullvad-vpn;
|
services.mullvad-vpn.package = pkgs.mullvad-vpn;
|
||||||
|
|
||||||
# System76 scheduler (not actually a scheduler, just a renice daemon) for improved responsiveness
|
# System76 scheduler (not actually a scheduler, just a renice daemon) for improved responsiveness
|
||||||
services.system76-scheduler.enable = true;
|
services.dbus.packages = [ pkgs.system76-scheduler ];
|
||||||
|
systemd.services."system76-scheduler" = {
|
||||||
|
description = "Automatically configure CPU scheduler for responsiveness on AC";
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "dbus";
|
||||||
|
BusName= "com.system76.Scheduler";
|
||||||
|
ExecStart = "${pkgs.system76-scheduler}/bin/system76-scheduler daemon";
|
||||||
|
ExecReload = "${pkgs.system76-scheduler}/bin/system76-scheduler daemon reload";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
environment.etc."system76-scheduler/assignments.ron".source =
|
||||||
|
"${pkgs.system76-scheduler}/etc/system76-scheduler/assignments.ron";
|
||||||
|
environment.etc."system76-scheduler/config.ron".source =
|
||||||
|
"${pkgs.system76-scheduler}/etc/system76-scheduler/config.ron";
|
||||||
|
environment.etc."system76-scheduler/exceptions.ron".source =
|
||||||
|
"${pkgs.system76-scheduler}/etc/system76-scheduler/exceptions.ron";
|
||||||
|
|
||||||
common.workstation = true;
|
common.workstation = true;
|
||||||
common.gettyAutologin = true;
|
common.gettyAutologin = true;
|
||||||
|
|
Loading…
Reference in a new issue