fa5436e0a7
GitOrigin-RevId: e8057b67ebf307f01bdcc8fba94d94f75039d1f6
26 lines
619 B
Nix
26 lines
619 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.user.services.hypridle = {
|
|
description = "Hypridle idle daemon";
|
|
wantedBy = [ "graphical-session.target" ];
|
|
partOf = [ "graphical-session.target" ];
|
|
script = lib.getExe cfg.package;
|
|
};
|
|
};
|
|
|
|
meta.maintainers = with lib.maintainers; [ johnrtitor ];
|
|
}
|