mirror of
https://github.com/alyraffauf/nixcfg.git
synced 2024-11-26 14:31:55 -05:00
home: make wayland-ipewire-idle-inhibit a systemd service
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
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
This commit is contained in:
parent
3eff37c8aa
commit
8cb38f8a30
|
@ -127,7 +127,6 @@ in {
|
||||||
[
|
[
|
||||||
"${pkgs.mate.mate-polkit}/libexec/polkit-mate-authentication-agent-1"
|
"${pkgs.mate.mate-polkit}/libexec/polkit-mate-authentication-agent-1"
|
||||||
(lib.getExe pkgs.waybar)
|
(lib.getExe pkgs.waybar)
|
||||||
(lib.getExe pkgs.wayland-pipewire-idle-inhibit)
|
|
||||||
]
|
]
|
||||||
++ lib.lists.optional (cfg.desktop.randomWallpaper)
|
++ lib.lists.optional (cfg.desktop.randomWallpaper)
|
||||||
helpers.wallpaperD
|
helpers.wallpaperD
|
||||||
|
|
|
@ -159,7 +159,6 @@ in {
|
||||||
[
|
[
|
||||||
{command = "${pkgs.mate.mate-polkit}/libexec/polkit-mate-authentication-agent-1";}
|
{command = "${pkgs.mate.mate-polkit}/libexec/polkit-mate-authentication-agent-1";}
|
||||||
{command = lib.getExe pkgs.autotiling;}
|
{command = lib.getExe pkgs.autotiling;}
|
||||||
{command = lib.getExe pkgs.wayland-pipewire-idle-inhibit;}
|
|
||||||
]
|
]
|
||||||
++ lib.optional cfg.desktop.randomWallpaper {command = "${helpers.wallpaperD}";}
|
++ lib.optional cfg.desktop.randomWallpaper {command = "${helpers.wallpaperD}";}
|
||||||
++ lib.optional (!cfg.desktop.randomWallpaper) {command = "${lib.getExe pkgs.swaybg} -i ${cfg.theme.wallpaper}";};
|
++ lib.optional (!cfg.desktop.randomWallpaper) {command = "${lib.getExe pkgs.swaybg} -i ${cfg.theme.wallpaper}";};
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
mako.enable = lib.mkDefault true;
|
mako.enable = lib.mkDefault true;
|
||||||
|
pipewire-inhibit.enable = lib.mkDefault true;
|
||||||
swayidle.enable = lib.mkDefault true;
|
swayidle.enable = lib.mkDefault true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -218,6 +218,7 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
pipewire-inhibit.enable = lib.mkEnableOption "Inhibit idle when audio is playing with Pipewire.";
|
||||||
swayidle.enable = lib.mkEnableOption "Swayidle idle daemon.";
|
swayidle.enable = lib.mkEnableOption "Swayidle idle daemon.";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
./gammastep
|
./gammastep
|
||||||
./mako
|
./mako
|
||||||
./mpd
|
./mpd
|
||||||
|
./pipewire-inhibit
|
||||||
./swayidle
|
./swayidle
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
26
homeManagerModules/services/pipewire-inhibit/default.nix
Normal file
26
homeManagerModules/services/pipewire-inhibit/default.nix
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
{
|
||||||
|
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"];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue