1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-11-08 11:36:05 +01:00
home-manager/modules/services/keynav.nix
Austin Horstman 03fdb31290
treewide: add missing package options (#7575)
Add options to support more flexible module configurations.

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2025-07-29 12:20:22 -05:00

42 lines
762 B
Nix

{
config,
lib,
pkgs,
...
}:
let
cfg = config.services.keynav;
in
{
options.services.keynav = {
enable = lib.mkEnableOption "keynav";
package = lib.mkPackageOption pkgs "keynav" { };
};
config = lib.mkIf cfg.enable {
assertions = [
(lib.hm.assertions.assertPlatform "services.keynav" pkgs lib.platforms.linux)
];
systemd.user.services.keynav = {
Unit = {
Description = "keynav";
After = [ "graphical-session.target" ];
PartOf = [ "graphical-session.target" ];
};
Service = {
ExecStart = lib.getExe cfg.package;
RestartSec = 3;
Restart = "always";
};
Install = {
WantedBy = [ "graphical-session.target" ];
};
};
};
}