7 cfg = config.services.handheld-daemon;
10 options.services.handheld-daemon = {
11 enable = mkEnableOption "Handheld Daemon";
12 package = mkPackageOption pkgs "handheld-daemon" { };
17 The user to run Handheld Daemon with.
22 config = mkIf cfg.enable {
23 environment.systemPackages = [ cfg.package ];
24 services.udev.packages = [ cfg.package ];
25 systemd.packages = [ cfg.package ];
27 systemd.services.handheld-daemon = {
28 description = "Handheld Daemon";
30 wantedBy = [ "multi-user.target" ];
32 restartIfChanged = true;
35 ExecStart = "${ lib.getExe cfg.package } --user ${ cfg.user }";
37 Restart = "on-failure";
43 meta.maintainers = [ maintainers.appsforartists ];