From ac312dec9880de36355529f0ced3f39fef6b8c35 Mon Sep 17 00:00:00 2001 From: chayleaf Date: Thu, 25 May 2023 06:32:52 +0700 Subject: [PATCH] switch to mainline system76-scheduler module (and fix eval) --- pkgs/default.nix | 1 - pkgs/system76-scheduler.nix | 65 ------------------------------------- system/hosts/nixmsi.nix | 18 +--------- system/modules/common.nix | 1 - 4 files changed, 1 insertion(+), 84 deletions(-) delete mode 100644 pkgs/system76-scheduler.nix diff --git a/pkgs/default.nix b/pkgs/default.nix index f762543..a98986d 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -40,7 +40,6 @@ in ''; }; rofi-steam-game-list = callPackage ./rofi-steam-game-list { }; - system76-scheduler = callPackage ./system76-scheduler.nix { }; techmino = callPackage ./techmino { }; firefox-addons = lib.recurseIntoAttrs (callPackage ./firefox-addons { inherit nur sources; }); diff --git a/pkgs/system76-scheduler.nix b/pkgs/system76-scheduler.nix deleted file mode 100644 index 803f488..0000000 --- a/pkgs/system76-scheduler.nix +++ /dev/null @@ -1,65 +0,0 @@ -{ 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" ]; - }; -} diff --git a/system/hosts/nixmsi.nix b/system/hosts/nixmsi.nix index 51f3d4d..feabe6e 100644 --- a/system/hosts/nixmsi.nix +++ b/system/hosts/nixmsi.nix @@ -194,23 +194,7 @@ in { services.mullvad-vpn.package = pkgs.mullvad-vpn; # System76 scheduler (not actually a scheduler, just a renice daemon) for improved responsiveness - 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"; + services.system76-scheduler.enable = true; common.workstation = true; common.gettyAutologin = true; diff --git a/system/modules/common.nix b/system/modules/common.nix index 8f6fc4f..6738c75 100644 --- a/system/modules/common.nix +++ b/system/modules/common.nix @@ -60,7 +60,6 @@ gfxmodeBios = cfg.resolution; }; - nixpkgs.overlays = [ (self: super: import ../pkgs { pkgs = super; inherit lib; }) ]; hardware.enableRedistributableFirmware = true; services.openssh.settings.PasswordAuthentication = false; services.tlp.settings.USB_EXCLUDE_PHONE = 1;