diff --git a/nixos/modules/services/hardware/usbrelayd.nix b/nixos/modules/services/hardware/usbrelayd.nix index c0322e89e6b..2cee4e1ff7e 100644 --- a/nixos/modules/services/hardware/usbrelayd.nix +++ b/nixos/modules/services/hardware/usbrelayd.nix @@ -26,8 +26,7 @@ in config = mkIf cfg.enable { - # TODO: Rename to .conf in upcomming release - environment.etc."usbrelayd.ini".text = '' + environment.etc."usbrelayd.conf".text = '' [MQTT] BROKER = ${cfg.broker} CLIENTNAME = ${cfg.clientName} @@ -41,4 +40,8 @@ in }; users.groups.usbrelay = { }; }; + + meta = { + maintainers = with lib.maintainers; [ wentasah ]; + }; } diff --git a/pkgs/os-specific/linux/usbrelay/daemon.nix b/pkgs/os-specific/linux/usbrelay/daemon.nix index 5f8d23e5201..e5e4baae9e9 100644 --- a/pkgs/os-specific/linux/usbrelay/daemon.nix +++ b/pkgs/os-specific/linux/usbrelay/daemon.nix @@ -25,9 +25,9 @@ stdenv.mkDerivation rec { install -m 644 -D usbrelayd $out/bin/usbrelayd install -m 644 -D usbrelayd.service $out/lib/systemd/system/usbrelayd.service install -m 644 -D 50-usbrelay.rules $out/lib/udev/rules.d/50-usbrelay.rules + install -m 644 -D usbrelayd.conf $out/etc/usbrelayd.conf # include this as an example runHook postInstall ''; - # TODO for later releases: install -D usbrelayd.conf $out/etc/usbrelayd.conf # include this as an example meta = { description = "USB Relay MQTT service"; diff --git a/pkgs/os-specific/linux/usbrelay/default.nix b/pkgs/os-specific/linux/usbrelay/default.nix index ebbb1dd7922..25388d3b230 100644 --- a/pkgs/os-specific/linux/usbrelay/default.nix +++ b/pkgs/os-specific/linux/usbrelay/default.nix @@ -1,15 +1,19 @@ -{ stdenv, lib, fetchFromGitHub, hidapi }: +{ stdenv, lib, fetchFromGitHub, hidapi, installShellFiles }: stdenv.mkDerivation rec { pname = "usbrelay"; - version = "0.9"; + version = "1.0"; src = fetchFromGitHub { owner = "darrylb123"; repo = "usbrelay"; rev = version; - sha256 = "sha256-bxME4r5W5bZKxMZ/Svi1EenqHKVWIjU6iiKaM8U6lmA="; + sha256 = "sha256-5zgpN4a+r0tmw0ISTJM+d9mo+L/qwUvpWPSsykuG0cg="; }; + nativeBuildInputs = [ + installShellFiles + ]; + buildInputs = [ hidapi ]; @@ -19,6 +23,10 @@ stdenv.mkDerivation rec { "PREFIX=${placeholder "out"}" ]; + postInstall = '' + installManPage usbrelay.1 + ''; + meta = with lib; { description = "Tool to control USB HID relays"; homepage = "https://github.com/darrylb123/usbrelay";