fix env in systemd services
This commit is contained in:
parent
752bcecb9f
commit
5277f5f683
3 changed files with 9 additions and 6 deletions
|
@ -14,18 +14,18 @@ in {
|
|||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
hm.services.hypridle = let
|
||||
hyprctl = "${config.modules.desktop.hyprland.package}/bin/hyprctl";
|
||||
in {
|
||||
hm.services.hypridle = {
|
||||
enable = true;
|
||||
package = cfg.package;
|
||||
|
||||
lockCmd = "${pkgs.procps}/bin/pidof hyprlock || ${hyprctl} dispatch exec ${lib.getExe config.modules.desktop.hyprlock.package}";
|
||||
lockCmd = "${pkgs.procps}/bin/pidof hyprlock || ${lib.getExe config.modules.desktop.hyprlock.package}";
|
||||
unlockCmd = "${pkgs.procps}/bin/pkill -USR1 hyprlock";
|
||||
|
||||
beforeSleepCmd = "${pkgs.systemd}/bin/loginctl lock-session";
|
||||
|
||||
listeners = [
|
||||
listeners = let
|
||||
hyprctl = "${config.modules.desktop.hyprland.package}/bin/hyprctl";
|
||||
in [
|
||||
{
|
||||
timeout = 90; # 1.5 min
|
||||
onTimeout = "${hyprctl} dispatch dpms off"; # turn off screen
|
||||
|
|
|
@ -35,6 +35,8 @@ in {
|
|||
xwayland.enable = true;
|
||||
package = cfg.package;
|
||||
|
||||
systemd.variables = [ "--all" ];
|
||||
|
||||
settings = {
|
||||
source = [];
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue