0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-13 13:40:28 +03:00

handheld-daemon: touchup code style to better match nixpkgs

Co-authored-by: h7x4 <h7x4@nani.wtf>
Co-authored-by: Luke Granger-Brown <git@lukegb.com>
Co-authored-by: Bruno BELANYI <bruno@belanyi.fr>
This commit is contained in:
Brenton Simpson 2024-01-22 11:12:04 -08:00
parent 3bfa7c5710
commit b960a217bd
2 changed files with 13 additions and 12 deletions

View file

@ -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";