2020-03-10 23:28:48 +01:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
|
|
|
|
cfg = config.services.keynav;
|
|
|
|
|
|
|
|
in {
|
2023-07-01 01:30:13 +02:00
|
|
|
options.services.keynav = { enable = mkEnableOption (lib.mdDoc "keynav"); };
|
2020-03-10 23:28:48 +01:00
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
2021-07-07 23:24:27 +02:00
|
|
|
assertions = [
|
|
|
|
(lib.hm.assertions.assertPlatform "services.keynav" pkgs
|
|
|
|
lib.platforms.linux)
|
|
|
|
];
|
|
|
|
|
2020-03-10 23:28:48 +01:00
|
|
|
systemd.user.services.keynav = {
|
|
|
|
Unit = {
|
|
|
|
Description = "keynav";
|
|
|
|
After = [ "graphical-session-pre.target" ];
|
|
|
|
PartOf = [ "graphical-session.target" ];
|
|
|
|
};
|
|
|
|
|
|
|
|
Service = {
|
2020-04-22 17:42:18 +02:00
|
|
|
ExecStart = "${pkgs.keynav}/bin/keynav";
|
2020-03-10 23:28:48 +01:00
|
|
|
RestartSec = 3;
|
|
|
|
Restart = "always";
|
|
|
|
};
|
|
|
|
|
|
|
|
Install = { WantedBy = [ "graphical-session.target" ]; };
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|