5eee20f731
If we don't add the dependency explicitly, the service won't be pulled in at runtime. Link: https://github.com/NixOS/nixpkgs/pull/340874#issuecomment-2365302744 Closes: https://github.com/NixOS/nixpkgs/issues/347651
28 lines
521 B
Nix
28 lines
521 B
Nix
{
|
|
lib,
|
|
pkgs,
|
|
config,
|
|
...
|
|
}:
|
|
|
|
let
|
|
cfg = config.services.hypridle;
|
|
in
|
|
{
|
|
options.services.hypridle = {
|
|
enable = lib.mkEnableOption "hypridle, Hyprland's idle daemon";
|
|
package = lib.mkPackageOption pkgs "hypridle" { };
|
|
};
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
environment.systemPackages = [ cfg.package ];
|
|
|
|
systemd = {
|
|
packages = [ cfg.package ];
|
|
user.services.hypridle.wantedBy = [ "graphical-session.target" ];
|
|
};
|
|
};
|
|
|
|
meta.maintainers = with lib.maintainers; [ johnrtitor ];
|
|
}
|