Manage ydotool socket

This commit is contained in:
Andrew Kvalheim 2023-06-16 13:41:45 -07:00
parent 597b9a41d2
commit 5508f8ca09
2 changed files with 5 additions and 1 deletions

View file

@ -1,4 +1,6 @@
#!/usr/bin/env bash
set -Eeuo pipefail
export YDOTOOL_SOCKET='/run/ydotool/ydotool.sock'
ydotool type --file <( gopass show --password "$1" )

View file

@ -22,12 +22,14 @@ in
isSystemUser = true;
};
systemd.tmpfiles.rules = [ "d /run/ydotool - ydotool ydotool -" ];
systemd.services.ydotoold = {
wantedBy = [ "multi-user.target" ]; # Pending NixOS/nixpkgs#169143
description = "ydotool daemon";
serviceConfig.User = "ydotool";
serviceConfig.SupplementaryGroups = [ "uinput" ];
script = "${cfg.package}/bin/ydotoold --socket-perm 0660";
script = "${cfg.package}/bin/ydotoold --socket-path /run/ydotool/ydotool.sock --socket-perm 0660";
};
};
}