mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2025-12-06 09:07:21 +01:00
36 lines
937 B
Nix
36 lines
937 B
Nix
{ lib, config, ... }:
|
|
{
|
|
options.swarselmodules.anki-tray = lib.mkEnableOption "enable anki applet for tray";
|
|
config = lib.mkIf config.swarselmodules.anki-tray {
|
|
|
|
systemd.user.services.anki-applet = {
|
|
Unit = {
|
|
Description = "Anki applet";
|
|
Requires = [ "tray.target" ];
|
|
After = [
|
|
"graphical-session.target"
|
|
"tray.target"
|
|
];
|
|
PartOf = [ "graphical-session.target" ];
|
|
};
|
|
|
|
Install = {
|
|
WantedBy = [ "graphical-session.target" ];
|
|
};
|
|
|
|
Service = {
|
|
# ExecStart = "${lib.getExe config.programs.anki.package}";
|
|
Type = "simple";
|
|
ExecStart = "/etc/profiles/per-user/${config.swarselsystems.mainUser}/bin/anki";
|
|
Environment = [
|
|
"QT_QPA_PLATFORM=xcb"
|
|
];
|
|
TimeoutStopSec = "2s";
|
|
KillMode = "mixed";
|
|
KillSignal = "SIGTERM";
|
|
SendSIGKILL = "yes";
|
|
};
|
|
};
|
|
|
|
};
|
|
}
|