mirror of
https://github.com/alyraffauf/nixcfg.git
synced 2024-11-26 22:31:53 -05:00
Aly Raffauf
8cb38f8a30
Some checks are pending
nix-build / default-build (push) Waiting to run
nix-build / fallarbor-build (push) Waiting to run
nix-build / lavaridge-build (push) Waiting to run
nix-build / mauville-build (push) Waiting to run
nix-build / petalburg-build (push) Waiting to run
nix-build / rustboro-build (push) Waiting to run
nix-check / fmt-check (push) Waiting to run
nix-check / eval-check (push) Waiting to run
27 lines
610 B
Nix
27 lines
610 B
Nix
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}: let
|
|
cfg = config.ar.home;
|
|
in {
|
|
config = lib.mkIf cfg.services.pipewire-inhibit.enable {
|
|
systemd.user.services.pipewire-inhibit-idle = {
|
|
Unit = {
|
|
After = "graphical-session.target";
|
|
Description = "inhibit idle when audio is playing with Pipewire.";
|
|
PartOf = "graphical-session.target";
|
|
};
|
|
|
|
Service = {
|
|
ExecStart = lib.getExe pkgs.wayland-pipewire-idle-inhibit;
|
|
Restart = "on-failure";
|
|
RestartSec = 5;
|
|
};
|
|
|
|
Install.WantedBy = ["hyprland-session.target" "sway-session.target"];
|
|
};
|
|
};
|
|
}
|