diff --git a/flake.lock b/flake.lock index a51b029..05c3b06 100644 --- a/flake.lock +++ b/flake.lock @@ -30,11 +30,11 @@ ] }, "locked": { - "lastModified": 1707059042, - "narHash": "sha256-6tomg1cTo7cwd7U3hIyDMA5iBuHg82cTr9TrUGnfxMw=", + "lastModified": 1704923501, + "narHash": "sha256-Kz3pymvpNHTlKruepOZ3lbiWxfGhtlK5JiqF0Hk+h6I=", "owner": "catppuccin", "repo": "vscode", - "rev": "50aa91ba31192bef8563a96e246d469091502d10", + "rev": "cf7019fdeba269650940fb0bd2c4e50c7bf498d8", "type": "github" }, "original": { @@ -64,11 +64,11 @@ "nixpkgs-lib": "nixpkgs-lib" }, "locked": { - "lastModified": 1706830856, - "narHash": "sha256-a0NYyp+h9hlb7ddVz4LUn1vT/PLwqfrWYcHMvFB1xYg=", + "lastModified": 1704982712, + "narHash": "sha256-2Ptt+9h8dczgle2Oo6z5ni5rt/uLMG47UFTR1ry/wgg=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "b253292d9c0a5ead9bc98c4e9a26c6312e27d69f", + "rev": "07f6395285469419cf9d078f59b5b49993198c00", "type": "github" }, "original": { @@ -123,11 +123,11 @@ ] }, "locked": { - "lastModified": 1707088232, - "narHash": "sha256-nxPBAZ//BwKkBcjwLE5g9zTq29g7gccTnH5+CeMTxpA=", + "lastModified": 1706798041, + "narHash": "sha256-BbvuF4CsVRBGRP8P+R+JUilojk0M60D7hzqE0bEvJBQ=", "owner": "nix-community", "repo": "home-manager", - "rev": "4740f2ccda184e9cc509d7a82b26d7271e0c79d9", + "rev": "4d53427bce7bf3d17e699252fd84dc7468afc46e", "type": "github" }, "original": { @@ -143,11 +143,11 @@ ] }, "locked": { - "lastModified": 1706981411, - "narHash": "sha256-cLbLPTL1CDmETVh4p0nQtvoF+FSEjsnJTFpTxhXywhQ=", + "lastModified": 1705659542, + "narHash": "sha256-WA3xVfAk1AYmFdwghT7mt/erYpsU6JPu9mdTEP/e9HQ=", "owner": "nix-community", "repo": "home-manager", - "rev": "652fda4ca6dafeb090943422c34ae9145787af37", + "rev": "10cd9c53115061aa6a0a90aad0b0dde6a999cdb9", "type": "github" }, "original": { @@ -165,11 +165,11 @@ ] }, "locked": { - "lastModified": 1707082092, - "narHash": "sha256-icyIxbBXl1iG8gvF/gjGI5N4Phpoo1vFcQxmUz2DsNA=", + "lastModified": 1706509827, + "narHash": "sha256-fnZ8BXDgfvXGwStQvmpUXe+I+Fjd2JCLm8xo0kVwVKc=", "owner": "Jovian-Experiments", "repo": "Jovian-NixOS", - "rev": "3a9a168c04218418a6321e157b0f7a31a9ca342c", + "rev": "e2c026d8efea340d2a2dcc56775212979dd51ef2", "type": "github" }, "original": { @@ -202,11 +202,11 @@ ] }, "locked": { - "lastModified": 1707009330, - "narHash": "sha256-epbXYb2noN8otPuTzYpxORRQcHKgm1E4wWJgZghynZs=", + "lastModified": 1706750085, + "narHash": "sha256-y/+t2ctdeUD/b0DLWS96UgGUs/srj7vbWef709DPxW4=", "owner": "fufexan", "repo": "nix-gaming", - "rev": "9bef54c361ae6fb8318ffb5e5d6d28c370c3a3d5", + "rev": "63fa64659760172fef0e4d674c6661b7ad53b16b", "type": "github" }, "original": { @@ -259,11 +259,11 @@ ] }, "locked": { - "lastModified": 1707016097, - "narHash": "sha256-V4lHr6hFQ3rK650dh64Xffxsf4kse9vUYWsM+ldjkco=", + "lastModified": 1706411424, + "narHash": "sha256-BzziJYucEZvdCE985vjPoo3ztWcmUiSQ1wJ2CoT6jCc=", "owner": "Mic92", "repo": "nix-index-database", - "rev": "3e3dad2808379c522138e2e8b0eb73500721a237", + "rev": "c782f2a4f6fc94311ab5ef31df2f1149a1856181", "type": "github" }, "original": { @@ -279,11 +279,11 @@ ] }, "locked": { - "lastModified": 1707016097, - "narHash": "sha256-V4lHr6hFQ3rK650dh64Xffxsf4kse9vUYWsM+ldjkco=", + "lastModified": 1706411424, + "narHash": "sha256-BzziJYucEZvdCE985vjPoo3ztWcmUiSQ1wJ2CoT6jCc=", "owner": "Mic92", "repo": "nix-index-database", - "rev": "3e3dad2808379c522138e2e8b0eb73500721a237", + "rev": "c782f2a4f6fc94311ab5ef31df2f1149a1856181", "type": "github" }, "original": { @@ -311,11 +311,11 @@ "nixpkgs-lib": { "locked": { "dir": "lib", - "lastModified": 1706550542, - "narHash": "sha256-UcsnCG6wx++23yeER4Hg18CXWbgNpqNXcHIo5/1Y+hc=", + "lastModified": 1703961334, + "narHash": "sha256-M1mV/Cq+pgjk0rt6VxoyyD+O8cOUiai8t9Q6Yyq4noY=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "97b17f32362e475016f942bbdfda4a4a72a8a652", + "rev": "b0d36bd0a420ecee3bc916c91886caca87c894e9", "type": "github" }, "original": { @@ -328,11 +328,11 @@ }, "nixpkgs-raw": { "locked": { - "lastModified": 1706826059, - "narHash": "sha256-N69Oab+cbt3flLvYv8fYnEHlBsWwdKciNZHUbynVEOA=", + "lastModified": 1706718339, + "narHash": "sha256-S+S97c/HzkO2A/YsU7ZmNF9w2s7Xk6P8dzmfDdckzLs=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "25e3d4c0d3591c99929b1ec07883177f6ea70c9d", + "rev": "53fbe41cf76b6a685004194e38e889bc8857e8c2", "type": "github" }, "original": { @@ -343,11 +343,11 @@ }, "nixpkgs-unstable-raw": { "locked": { - "lastModified": 1706913249, - "narHash": "sha256-x3M7iV++CsvRXI1fpyFPduGELUckZEhSv0XWnUopAG8=", + "lastModified": 1706550542, + "narHash": "sha256-UcsnCG6wx++23yeER4Hg18CXWbgNpqNXcHIo5/1Y+hc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "e92b6015881907e698782c77641aa49298330223", + "rev": "97b17f32362e475016f942bbdfda4a4a72a8a652", "type": "github" }, "original": { @@ -358,11 +358,11 @@ }, "nur": { "locked": { - "lastModified": 1707090259, - "narHash": "sha256-ZZEQCpPohb2KbaRK3ijp+fbuAISevFp9FpADjFjq5bc=", + "lastModified": 1706863127, + "narHash": "sha256-GYAHiJ6Q/aJKJt2UbPh5/l+Zpmj+ofjckmGcMl/6t2w=", "owner": "nix-community", "repo": "NUR", - "rev": "51437703b754e4be55f604c6cfb8eee8f8874ab8", + "rev": "bfb80b4b69abcdab9f09e83637fb88de3c5c890c", "type": "github" }, "original": { @@ -381,11 +381,11 @@ ] }, "locked": { - "lastModified": 1707045317, - "narHash": "sha256-o2NZJcNu2/M3qycZ2Z9sgIESQEBFmihbbA7//sp7yVA=", + "lastModified": 1706718414, + "narHash": "sha256-qOwU5X0nG4nJ3xBSKWfJ9ROf6T2r7jThO85AiBimwgc=", "owner": "pjones", "repo": "plasma-manager", - "rev": "290cd65b65e2da11ca9fda69781ea9beb8a6f6ac", + "rev": "91b5335d4310e94527a8a778d5e8884c43340276", "type": "github" }, "original": { @@ -453,11 +453,11 @@ ] }, "locked": { - "lastModified": 1707009713, - "narHash": "sha256-oDr8YWRKFmwV2+B4H0ih7BbYjKAMi99yBpzVAXdWWo0=", + "lastModified": 1706836587, + "narHash": "sha256-+NsqaijHVIaPepCwkbhXyocHR0N+1PsRjQfX6PRHkkA=", "owner": "nix-community", "repo": "nix-vscode-extensions", - "rev": "5a034e1b2dee0df8c8d8a6b25902fbc61c26a139", + "rev": "67b1cc7b069da720c8c3af0ab1b19eae28c6bb07", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 4074c49..3071d97 100644 --- a/flake.nix +++ b/flake.nix @@ -80,7 +80,8 @@ name = "patched-nixpkgs-unstable"; src = nixpkgs-unstable-raw; patches = [ - + ./nixpkgs-patches/pr277661.patch + ./nixpkgs-patches/pr284962.patch ]; }; nixpkgs-patched = nixpkgs-raw.legacyPackages.x86_64-linux.applyPatches { diff --git a/machines/WinMax2/configuration.nix b/machines/WinMax2/configuration.nix index b41a681..d622c7b 100755 --- a/machines/WinMax2/configuration.nix +++ b/machines/WinMax2/configuration.nix @@ -79,9 +79,8 @@ ACTION=="add", SUBSYSTEM=="i2c", ATTR{name}=="PNP0C50:00", ATTR{power/wakeup}="d user = "toast"; desktopSession = "plasmawayland"; }; - hardware.amd.gpu.enableBacklightControl = true; # Need patched mesa - steamos = { + devices.steamdeck = { enableMesaPatches = true; enableVendorRadv = true; }; diff --git a/nixpkgs-patches/pr277661.patch b/nixpkgs-patches/pr277661.patch new file mode 100644 index 0000000..0b08ad1 --- /dev/null +++ b/nixpkgs-patches/pr277661.patch @@ -0,0 +1,404 @@ +From bcf9a24332a04ddcef154b792697320d40829820 Mon Sep 17 00:00:00 2001 +From: Brenton Simpson +Date: Mon, 1 Jan 2024 16:18:45 -0800 +Subject: [PATCH 1/6] handheld-daemon: init at 0.2.7 + +--- + .../manual/release-notes/rl-2405.section.md | 2 + + nixos/modules/module-list.nix | 1 + + .../services/hardware/handheld-daemon.nix | 43 +++++++++++++++ + pkgs/by-name/ha/handheld-daemon/package.nix | 54 +++++++++++++++++++ + 4 files changed, 100 insertions(+) + create mode 100644 nixos/modules/services/hardware/handheld-daemon.nix + create mode 100644 pkgs/by-name/ha/handheld-daemon/package.nix + +diff --git a/nixos/doc/manual/release-notes/rl-2405.section.md b/nixos/doc/manual/release-notes/rl-2405.section.md +index f4434fd6b94cac..3ddc2f781bd968 100644 +--- a/nixos/doc/manual/release-notes/rl-2405.section.md ++++ b/nixos/doc/manual/release-notes/rl-2405.section.md +@@ -22,6 +22,8 @@ In addition to numerous new and upgraded packages, this release has the followin + + + ++- [Handheld Daemon](https://github.com/hhd-dev/hhd), support for gaming handhelds like the Legion Go, ROG Ally, and GPD Win. Available as [services.handheldDaemon](#opt-services.handheldDaemon.enable). ++ + - [Guix](https://guix.gnu.org), a functional package manager inspired by Nix. Available as [services.guix](#opt-services.guix.enable). + + - [maubot](https://github.com/maubot/maubot), a plugin-based Matrix bot framework. Available as [services.maubot](#opt-services.maubot.enable). +diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix +index 00e6240f531d52..154fd8df2ce08d 100644 +--- a/nixos/modules/module-list.nix ++++ b/nixos/modules/module-list.nix +@@ -532,6 +532,7 @@ + ./services/hardware/fancontrol.nix + ./services/hardware/freefall.nix + ./services/hardware/fwupd.nix ++ ./services/hardware/handheld-daemon.nix + ./services/hardware/hddfancontrol.nix + ./services/hardware/illum.nix + ./services/hardware/interception-tools.nix +diff --git a/nixos/modules/services/hardware/handheld-daemon.nix b/nixos/modules/services/hardware/handheld-daemon.nix +new file mode 100644 +index 00000000000000..a513ed7ddf8efe +--- /dev/null ++++ b/nixos/modules/services/hardware/handheld-daemon.nix +@@ -0,0 +1,43 @@ ++{ config ++, lib ++, pkgs ++, ... ++}: ++with lib; let ++ cfg = config.services.handheldDaemon; ++in ++{ ++ options.services.handheldDaemon = { ++ enable = mkEnableOption "Enable Handheld Daemon"; ++ ++ user = mkOption { ++ type = types.str; ++ description = lib.mdDoc '' ++ The user to run Handheld Daemon with. ++ ''; ++ }; ++ }; ++ ++ config = mkIf cfg.enable { ++ environment.systemPackages = [ pkgs.handheld-daemon ]; ++ services.udev.packages = [ pkgs.handheld-daemon ]; ++ systemd.packages = [ pkgs.handheld-daemon ]; ++ ++ systemd.services.handheldDaemon = { ++ description = "Handheld Daemon"; ++ ++ wantedBy = [ "multi-user.target" ]; ++ ++ restartIfChanged = true; ++ ++ serviceConfig = { ++ ExecStart = "${ pkgs.handheld-daemon }/bin/hhd --user ${ cfg.user }"; ++ Nice = "-12"; ++ Restart = "on-failure"; ++ RestartSec = "10"; ++ }; ++ }; ++ }; ++ ++ meta.maintainers = [ maintainers.appsforartists ]; ++} +diff --git a/pkgs/by-name/ha/handheld-daemon/package.nix b/pkgs/by-name/ha/handheld-daemon/package.nix +new file mode 100644 +index 00000000000000..b8b14d85f45bf7 +--- /dev/null ++++ b/pkgs/by-name/ha/handheld-daemon/package.nix +@@ -0,0 +1,54 @@ ++{ config ++, fetchFromGitHub ++, hidapi ++, lib ++, python3 ++, ++}: ++python3.pkgs.buildPythonApplication rec { ++ pname = "handheld-daemon"; ++ version = "0.2.7"; ++ format = "pyproject"; ++ ++ src = fetchFromGitHub { ++ owner = "hhd-dev"; ++ repo = "hhd"; ++ rev = "ccae6b207cadfbdaef292270c4fc6c855f71ba03"; ++ hash = "sha256-+tyiXOvZXLbomhgFRKUNKGbkkkOxQKdk/kjeWZ4pvO0="; ++ }; ++ ++ pythonPath = with python3.pkgs; [ ++ evdev ++ pyyaml ++ rich ++ ]; ++ ++ nativeBuildInputs = with python3.pkgs; [ ++ setuptools ++ ]; ++ ++ propagatedBuildInputs = [ ++ hidapi ++ ]; ++ ++ # handheld-daemon contains a fork of the python module `hid`, so this hook ++ # is borrowed from the `hid` derivation. ++ postPatch = '' ++ hidapi=${ hidapi }/lib/ ++ test -d $hidapi || { echo "ERROR: $hidapi doesn't exist, please update/fix this build expression."; exit 1; } ++ sed -i -e "s|libhidapi|$hidapi/libhidapi|" src/hhd/controller/lib/hid.py ++ ''; ++ ++ postInstall = '' ++ install -Dm644 $src/usr/lib/udev/rules.d/83-hhd.rules -t $out/lib/udev/rules.d/ ++ ''; ++ ++ meta = with lib; { ++ homepage = "https://github.com/hhd-dev/hhd/"; ++ description = "Linux support for gaming handhelds"; ++ platforms = platforms.linux; ++ license = licenses.mit; ++ maintainers = with maintainers; [ appsforartists ]; ++ mainProgram = "hhd"; ++ }; ++} + +From 52f22bfc57dff00a93343e30a42e434b68062196 Mon Sep 17 00:00:00 2001 +From: Brenton Simpson +Date: Wed, 17 Jan 2024 09:52:06 -0800 +Subject: [PATCH 2/6] handheld-daemon: 0.27 -> 1.0.8 + +--- + pkgs/by-name/ha/handheld-daemon/package.nix | 7 +++---- + 1 file changed, 3 insertions(+), 4 deletions(-) + +diff --git a/pkgs/by-name/ha/handheld-daemon/package.nix b/pkgs/by-name/ha/handheld-daemon/package.nix +index b8b14d85f45bf7..f590665a8292fa 100644 +--- a/pkgs/by-name/ha/handheld-daemon/package.nix ++++ b/pkgs/by-name/ha/handheld-daemon/package.nix +@@ -3,18 +3,17 @@ + , hidapi + , lib + , python3 +-, + }: + python3.pkgs.buildPythonApplication rec { + pname = "handheld-daemon"; +- version = "0.2.7"; ++ version = "1.0.8"; + format = "pyproject"; + + src = fetchFromGitHub { + owner = "hhd-dev"; + repo = "hhd"; +- rev = "ccae6b207cadfbdaef292270c4fc6c855f71ba03"; +- hash = "sha256-+tyiXOvZXLbomhgFRKUNKGbkkkOxQKdk/kjeWZ4pvO0="; ++ rev = "6cb83a9833eebc81bd27bed57eb68ece15cdd7a6"; ++ hash = "sha256-YfBi5UKaB+v+eDI8rcvqkogAYRU2kTc0NqvakhKxBOE="; + }; + + pythonPath = with python3.pkgs; [ + +From f571033ce013a416c744bd3d3ffc0fe525dbe3a9 Mon Sep 17 00:00:00 2001 +From: Brenton Simpson +Date: Sat, 20 Jan 2024 17:56:44 -0800 +Subject: [PATCH 3/6] handheld-daemon: use kebab-case instead of camelCase for + service name + +--- + nixos/doc/manual/release-notes/rl-2405.section.md | 2 +- + nixos/modules/services/hardware/handheld-daemon.nix | 6 +++--- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/nixos/doc/manual/release-notes/rl-2405.section.md b/nixos/doc/manual/release-notes/rl-2405.section.md +index 3ddc2f781bd968..994f642154619c 100644 +--- a/nixos/doc/manual/release-notes/rl-2405.section.md ++++ b/nixos/doc/manual/release-notes/rl-2405.section.md +@@ -22,7 +22,7 @@ In addition to numerous new and upgraded packages, this release has the followin + + + +-- [Handheld Daemon](https://github.com/hhd-dev/hhd), support for gaming handhelds like the Legion Go, ROG Ally, and GPD Win. Available as [services.handheldDaemon](#opt-services.handheldDaemon.enable). ++- [Handheld Daemon](https://github.com/hhd-dev/hhd), support for gaming handhelds like the Legion Go, ROG Ally, and GPD Win. Available as [services.handheld-daemon](#opt-services.handheld-daemon.enable). + + - [Guix](https://guix.gnu.org), a functional package manager inspired by Nix. Available as [services.guix](#opt-services.guix.enable). + +diff --git a/nixos/modules/services/hardware/handheld-daemon.nix b/nixos/modules/services/hardware/handheld-daemon.nix +index a513ed7ddf8efe..81859bf5b122fe 100644 +--- a/nixos/modules/services/hardware/handheld-daemon.nix ++++ b/nixos/modules/services/hardware/handheld-daemon.nix +@@ -4,10 +4,10 @@ + , ... + }: + with lib; let +- cfg = config.services.handheldDaemon; ++ cfg = config.services.handheld-daemon; + in + { +- options.services.handheldDaemon = { ++ options.services.handheld-daemon = { + enable = mkEnableOption "Enable Handheld Daemon"; + + user = mkOption { +@@ -23,7 +23,7 @@ in + services.udev.packages = [ pkgs.handheld-daemon ]; + systemd.packages = [ pkgs.handheld-daemon ]; + +- systemd.services.handheldDaemon = { ++ systemd.services.handheld-daemon = { + description = "Handheld Daemon"; + + wantedBy = [ "multi-user.target" ]; + +From f939675e04ac34d91b2d549a105de4b7b1446255 Mon Sep 17 00:00:00 2001 +From: Brenton Simpson +Date: Mon, 22 Jan 2024 11:13:15 -0800 +Subject: [PATCH 4/6] handheld-daemon: 1.0.8 -> 1.1.0 + +--- + pkgs/by-name/ha/handheld-daemon/package.nix | 17 +++++++++-------- + 1 file changed, 9 insertions(+), 8 deletions(-) + +diff --git a/pkgs/by-name/ha/handheld-daemon/package.nix b/pkgs/by-name/ha/handheld-daemon/package.nix +index f590665a8292fa..e037c4da70868b 100644 +--- a/pkgs/by-name/ha/handheld-daemon/package.nix ++++ b/pkgs/by-name/ha/handheld-daemon/package.nix +@@ -1,19 +1,21 @@ + { config + , fetchFromGitHub + , hidapi ++, kmod + , lib + , python3 ++, toybox + }: + python3.pkgs.buildPythonApplication rec { + pname = "handheld-daemon"; +- version = "1.0.8"; ++ version = "1.1.0"; + format = "pyproject"; + + src = fetchFromGitHub { + owner = "hhd-dev"; + repo = "hhd"; +- rev = "6cb83a9833eebc81bd27bed57eb68ece15cdd7a6"; +- hash = "sha256-YfBi5UKaB+v+eDI8rcvqkogAYRU2kTc0NqvakhKxBOE="; ++ rev = "abe34c6841476f5b41afe30ee18ff3e510402d68"; ++ hash = "sha256-ovLC1BQ98jUaDEMPBzWma4TYSzTF+yE/cMemFdJmqlE="; + }; + + pythonPath = with python3.pkgs; [ +@@ -22,12 +24,11 @@ python3.pkgs.buildPythonApplication rec { + rich + ]; + +- nativeBuildInputs = with python3.pkgs; [ +- setuptools +- ]; +- +- propagatedBuildInputs = [ ++ propagatedBuildInputs = with python3.pkgs; [ + hidapi ++ kmod ++ setuptools ++ toybox + ]; + + # handheld-daemon contains a fork of the python module `hid`, so this hook + +From 3bfa7c5710fd06ba32bf844ca2d414a87308ebea Mon Sep 17 00:00:00 2001 +From: Brenton Simpson +Date: Mon, 29 Jan 2024 17:11:48 -0800 +Subject: [PATCH 5/6] handheld-daemon: touchup package description + +--- + pkgs/by-name/ha/handheld-daemon/package.nix | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/pkgs/by-name/ha/handheld-daemon/package.nix b/pkgs/by-name/ha/handheld-daemon/package.nix +index e037c4da70868b..7df459cc9adda8 100644 +--- a/pkgs/by-name/ha/handheld-daemon/package.nix ++++ b/pkgs/by-name/ha/handheld-daemon/package.nix +@@ -45,7 +45,7 @@ python3.pkgs.buildPythonApplication rec { + + meta = with lib; { + homepage = "https://github.com/hhd-dev/hhd/"; +- description = "Linux support for gaming handhelds"; ++ description = "Linux support for handheld gaming devices like the Legion Go, ROG Ally, and GPD Win"; + platforms = platforms.linux; + license = licenses.mit; + maintainers = with maintainers; [ appsforartists ]; + +From b960a217bd351378b01a27f37df9d4b0028570b0 Mon Sep 17 00:00:00 2001 +From: Brenton Simpson +Date: Mon, 22 Jan 2024 11:12:04 -0800 +Subject: [PATCH 6/6] handheld-daemon: touchup code style to better match + nixpkgs + +Co-authored-by: h7x4 +Co-authored-by: Luke Granger-Brown +Co-authored-by: Bruno BELANYI +--- + .../services/hardware/handheld-daemon.nix | 9 +++++---- + pkgs/by-name/ha/handheld-daemon/package.nix | 16 ++++++++-------- + 2 files changed, 13 insertions(+), 12 deletions(-) + +diff --git a/nixos/modules/services/hardware/handheld-daemon.nix b/nixos/modules/services/hardware/handheld-daemon.nix +index 81859bf5b122fe..e8a7a39f441d25 100644 +--- a/nixos/modules/services/hardware/handheld-daemon.nix ++++ b/nixos/modules/services/hardware/handheld-daemon.nix +@@ -9,6 +9,7 @@ in + { + options.services.handheld-daemon = { + enable = mkEnableOption "Enable Handheld Daemon"; ++ package = mkPackageOption pkgs "handheld-daemon" { }; + + user = mkOption { + type = types.str; +@@ -19,9 +20,9 @@ in + }; + + config = mkIf cfg.enable { +- environment.systemPackages = [ pkgs.handheld-daemon ]; +- services.udev.packages = [ pkgs.handheld-daemon ]; +- systemd.packages = [ pkgs.handheld-daemon ]; ++ environment.systemPackages = [ cfg.package ]; ++ services.udev.packages = [ cfg.package ]; ++ systemd.packages = [ cfg.package ]; + + systemd.services.handheld-daemon = { + description = "Handheld Daemon"; +@@ -31,7 +32,7 @@ in + restartIfChanged = true; + + serviceConfig = { +- ExecStart = "${ pkgs.handheld-daemon }/bin/hhd --user ${ cfg.user }"; ++ ExecStart = "${ lib.getExe cfg.package } --user ${ cfg.user }"; + Nice = "-12"; + Restart = "on-failure"; + RestartSec = "10"; +diff --git a/pkgs/by-name/ha/handheld-daemon/package.nix b/pkgs/by-name/ha/handheld-daemon/package.nix +index 7df459cc9adda8..bb0c9d65bfe19d 100644 +--- a/pkgs/by-name/ha/handheld-daemon/package.nix ++++ b/pkgs/by-name/ha/handheld-daemon/package.nix +@@ -9,28 +9,28 @@ + python3.pkgs.buildPythonApplication rec { + pname = "handheld-daemon"; + version = "1.1.0"; +- format = "pyproject"; ++ pyproject = true; + + src = fetchFromGitHub { + owner = "hhd-dev"; + repo = "hhd"; +- rev = "abe34c6841476f5b41afe30ee18ff3e510402d68"; ++ rev = "v${version}"; + hash = "sha256-ovLC1BQ98jUaDEMPBzWma4TYSzTF+yE/cMemFdJmqlE="; + }; + +- pythonPath = with python3.pkgs; [ +- evdev +- pyyaml +- rich +- ]; +- + propagatedBuildInputs = with python3.pkgs; [ ++ evdev + hidapi + kmod ++ pyyaml ++ rich + setuptools + toybox + ]; + ++ # This package doesn't have upstream tests. ++ doCheck = false; ++ + # handheld-daemon contains a fork of the python module `hid`, so this hook + # is borrowed from the `hid` derivation. + postPatch = '' diff --git a/nixpkgs-patches/pr284962.patch b/nixpkgs-patches/pr284962.patch new file mode 100644 index 0000000..11e2c9b --- /dev/null +++ b/nixpkgs-patches/pr284962.patch @@ -0,0 +1,23 @@ +From 0f34032f5a31b46da08126c9ccec16ffaab964fe Mon Sep 17 00:00:00 2001 +From: K900 +Date: Tue, 30 Jan 2024 11:38:10 +0300 +Subject: [PATCH] nixos/plasma5: install missing style plugins + +--- + nixos/modules/services/x11/desktop-managers/plasma5.nix | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/nixos/modules/services/x11/desktop-managers/plasma5.nix b/nixos/modules/services/x11/desktop-managers/plasma5.nix +index 38c858aaef0533..1611d77d81cf15 100644 +--- a/nixos/modules/services/x11/desktop-managers/plasma5.nix ++++ b/nixos/modules/services/x11/desktop-managers/plasma5.nix +@@ -253,6 +253,9 @@ in + plasma-integration + polkit-kde-agent + ++ qqc2-breeze-style ++ qqc2-desktop-style ++ + plasma-desktop + plasma-workspace + plasma-workspace-wallpapers