nixos/opentabletdriver: fix "Daemon is already running" (#473683)
This commit is contained in:
@@ -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";
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user