mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-19 20:21:14 +00:00
Merge pull request #147232 from mkg20001/zen-tweaks
This commit is contained in:
commit
41e3072c81
|
@ -137,6 +137,7 @@
|
|||
./programs/captive-browser.nix
|
||||
./programs/ccache.nix
|
||||
./programs/cdemu.nix
|
||||
./programs/cfs-zen-tweaks.nix
|
||||
./programs/chromium.nix
|
||||
./programs/clickshare.nix
|
||||
./programs/cnping.nix
|
||||
|
|
28
nixos/modules/programs/cfs-zen-tweaks.nix
Normal file
28
nixos/modules/programs/cfs-zen-tweaks.nix
Normal file
|
@ -0,0 +1,28 @@
|
|||
# CFS Zen Tweaks
|
||||
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
|
||||
cfg = config.programs.cfs-zen-tweaks;
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
|
||||
meta = {
|
||||
maintainers = with maintainers; [ mkg20001 ];
|
||||
};
|
||||
|
||||
options = {
|
||||
programs.cfs-zen-tweaks.enable = mkEnableOption "CFS Zen Tweaks";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
systemd.packages = [ pkgs.cfs-zen-tweaks ];
|
||||
|
||||
systemd.services.set-cfs-tweak.wantedBy = [ "multi-user.target" "suspend.target" "hibernate.target" "hybrid-sleep.target" "suspend-then-hibernate.target" ];
|
||||
};
|
||||
}
|
43
pkgs/os-specific/linux/cfs-zen-tweaks/default.nix
Normal file
43
pkgs/os-specific/linux/cfs-zen-tweaks/default.nix
Normal file
|
@ -0,0 +1,43 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
, makeWrapper
|
||||
, gawk
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "cfs-zen-tweaks";
|
||||
version = "1.2.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "igo95862";
|
||||
repo = "cfs-zen-tweaks";
|
||||
rev = version;
|
||||
sha256 = "HRR2tdjNmWyrpbcMlihSdb/7g/tHma3YyXogQpRCVyo=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs set-cfs-zen-tweaks.bash
|
||||
chmod +x set-cfs-zen-tweaks.bash
|
||||
substituteInPlace set-cfs-zen-tweaks.bash \
|
||||
--replace '$(gawk' '$(${gawk}/bin/gawk'
|
||||
'';
|
||||
|
||||
buildInputs = [
|
||||
gawk
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
makeWrapper
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Tweak Linux CPU scheduler for desktop responsiveness";
|
||||
homepage = "https://github.com/igo95862/cfs-zen-tweaks";
|
||||
license = licenses.gpl2Only;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ mkg20001 ];
|
||||
};
|
||||
}
|
|
@ -4855,6 +4855,8 @@ with pkgs;
|
|||
|
||||
cfssl = callPackage ../tools/security/cfssl { };
|
||||
|
||||
cfs-zen-tweaks = callPackage ../os-specific/linux/cfs-zen-tweaks { };
|
||||
|
||||
chafa = callPackage ../tools/misc/chafa {
|
||||
inherit (darwin.apple_sdk.frameworks) Foundation;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue