nixos/opentabletdriver: fix "Daemon is already running" (#473683)

This commit is contained in:
Gergő Gutyina
2026-01-13 14:04:10 +00:00
committed by GitHub
+10 -1
View File
@@ -8,7 +8,10 @@ let
cfg = config.hardware.opentabletdriver;
in
{
meta.maintainers = with lib.maintainers; [ thiagokokada ];
meta.maintainers = with lib.maintainers; [
gepbird
thiagokokada
];
options = {
hardware.opentabletdriver = {
@@ -60,6 +63,12 @@ in
serviceConfig = {
Type = "simple";
# workaround for https://github.com/NixOS/nixpkgs/issues/469340
ExecStartPre = pkgs.writeShellScript "disable-for-gdm-greeter" ''
if [[ "$USER" = "gdm-greeter"* ]]; then
exit 1
fi
'';
ExecStart = lib.getExe' cfg.package "otd-daemon";
Restart = "on-failure";
};