summaryrefslogtreecommitdiff
path: root/pkgs/cachyos-settings
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/cachyos-settings')
-rw-r--r--pkgs/cachyos-settings/default.nix34
1 files changed, 34 insertions, 0 deletions
diff --git a/pkgs/cachyos-settings/default.nix b/pkgs/cachyos-settings/default.nix
new file mode 100644
index 0000000..006dbf9
--- /dev/null
+++ b/pkgs/cachyos-settings/default.nix
@@ -0,0 +1,34 @@
+{
+ stdenv,
+ fetchFromGitHub,
+ bash,
+ hdparm,
+}:
+stdenv.mkDerivation (finalAttrs: {
+ pname = "cachyos-settings";
+ version = "1.3.5";
+
+ src = fetchFromGitHub {
+ owner = "CachyOS";
+ repo = "CachyOS-Settings";
+ tag = finalAttrs.version;
+ hash = "sha256-hAYnrfzqwLbi7Y/nrJgy4voZ+K3Tvx+Dt35JS+kizQc=";
+ };
+
+ dontBuild = true;
+ dontConfigure = true;
+
+ postPatch = ''
+ substituteInPlace usr/lib/udev/rules.d/*.rules \
+ --replace "/bin/sh" "${bash}/bin/sh" \
+ --replace "/usr/bin/bash" "${bash}/bin/bash" \
+ --replace "/usr/bin/hdparm" "${hdparm}/bin/hdparm"
+ '';
+
+ installPhase = ''
+ mkdir -p $out/etc/udev/rules.d
+ cp usr/lib/udev/rules.d/*.rules $out/etc/udev/rules.d
+ mkdir -p $out/etc/sysctl.d
+ cp usr/lib/sysctl.d/*.conf $out/etc/sysctl.d
+ '';
+})