Commit b960a217 authored by Brenton Simpson's avatar Brenton Simpson
Browse files

handheld-daemon: touchup code style to better match nixpkgs



Co-authored-by: default avatarh7x4 <h7x4@nani.wtf>
Co-authored-by: default avatarLuke Granger-Brown <git@lukegb.com>
Co-authored-by: default avatarBruno BELANYI <bruno@belanyi.fr>
parent 3bfa7c57
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -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";
+8 −8
Original line number Diff line number Diff line
@@ -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 = ''