1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2024-12-15 17:50:53 +00:00
home-manager/modules/services/keynav.nix

35 lines
701 B
Nix
Raw Normal View History

2020-03-10 22:28:48 +00:00
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.keynav;
in {
options.services.keynav = { enable = mkEnableOption "keynav"; };
config = mkIf cfg.enable {
assertions = [
(lib.hm.assertions.assertPlatform "services.keynav" pkgs
lib.platforms.linux)
];
2020-03-10 22:28:48 +00:00
systemd.user.services.keynav = {
Unit = {
Description = "keynav";
After = [ "graphical-session-pre.target" ];
PartOf = [ "graphical-session.target" ];
};
Service = {
ExecStart = "${pkgs.keynav}/bin/keynav";
2020-03-10 22:28:48 +00:00
RestartSec = 3;
Restart = "always";
};
Install = { WantedBy = [ "graphical-session.target" ]; };
};
};
}