pacifidlog: add hdd adjustor

This commit is contained in:
Aly Raffauf 2024-10-13 17:07:45 -04:00
parent 06bd802029
commit f418d076bf
2 changed files with 48 additions and 1 deletions

View file

@ -0,0 +1,36 @@
{ fetchFromGitHub
, lib
, python3
}:
python3.pkgs.buildPythonApplication rec {
pname = "adjustor";
version = "3.4.5";
pyproject = true;
src = fetchFromGitHub {
owner = "hhd-dev";
repo = "adjustor";
rev = "v${version}";
hash = "sha256-tde9FfP9MVOw1/0c4y8fQxVNmvvqjPG97S4bphOdqws=";
};
propagatedBuildInputs = with python3.pkgs; [
setuptools
rich
pyroute2
fuse
pygobject3
dbus-python
];
# This package doesn't have upstream tests.
doCheck = false;
meta = with lib; {
homepage = "https://github.com/hhd-dev/adjustor/";
description = "Allows for TDP control of AMD Handhelds under handheld-daemon support";
platforms = platforms.linux;
license = licenses.mit;
};
}

View file

@ -1,6 +1,7 @@
# Lenovo Legion Go # Lenovo Legion Go
{ {
config, config,
pkgs,
lib, lib,
self, self,
... ...
@ -87,9 +88,19 @@
}) })
]; ];
services.handheld-daemon = { services.handheld-daemon = let
adjustor = pkgs.callPackage ./adjustor.nix {};
in {
enable = true; enable = true;
user = "aly"; user = "aly";
package = with pkgs;
handheld-daemon.overrideAttrs (oldAttrs: {
propagatedBuildInputs =
oldAttrs.propagatedBuildInputs
++ [
adjustor
];
});
}; };
system.stateVersion = "24.11"; system.stateVersion = "24.11";