mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-17 10:24:07 +00:00
e58f4b3aa0
Without this journal error pops up as: Oct 31 17:51:00 Ainz-NIX hypridle[2720]: [LOG] Process Created with pid 5398 Oct 31 17:51:00 Ainz-NIX hypridle[5399]: /bin/sh: line 1: pidof: command not found Oct 31 17:51:00 Ainz-NIX hypridle[5398]: /bin/sh: line 1: hyprlock: command not found Oct 31 17:51:19 Ainz-NIX hypridle[2720]: [LOG] Got PrepareForSleep from dbus with sleep false Oct 31 17:51:19 Ainz-NIX hypridle[2720]: [LOG] Running: hyprctl dispatch dpms on Oct 31 17:51:19 Ainz-NIX hypridle[2720]: [LOG] Executing hyprctl dispatch dpms on Oct 31 17:51:19 Ainz-NIX hypridle[2720]: [LOG] Process Created with pid 5567 Oct 31 17:51:19 Ainz-NIX hypridle[5567]: /bin/sh: line 1: hyprctl: command not found
33 lines
670 B
Nix
33 lines
670 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" ];
|
|
user.services.hypridle.path = [
|
|
config.programs.hyprland.package
|
|
config.programs.hyprlock.package
|
|
pkgs.procps
|
|
];
|
|
};
|
|
};
|
|
|
|
meta.maintainers = with lib.maintainers; [ johnrtitor ];
|
|
}
|