nixpkgs/nixos/modules/services/wayland/hypridle.nix
John Titor e58f4b3aa0
nixos/hypridle: add hyprctl, hyprlock and pidof to path
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
2024-10-31 18:06:26 +05:30

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 ];
}