.dotfiles/modules/home/common/anki-tray.nix
Leon Schwarzäugl 694dd794f7
Some checks failed
Build and Deploy / build (push) Has been cancelled
Flake check / Check flake (push) Has been cancelled
Build and Deploy / deploy (push) Has been cancelled
feat: switch to niri+noctalia
2026-02-07 05:28:34 +01:00

38 lines
942 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 = [ "graphical-session.target" ];
After = [
"graphical-session.target"
"tray.target"
];
PartOf = [
"tray.target"
];
};
Install = {
WantedBy = [ "tray.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";
};
};
};
}