This commit is contained in:
Lucy Hochkamp 2025-04-24 19:47:30 +02:00
parent b69b80c93f
commit 11bd02cf4f
No known key found for this signature in database
18 changed files with 177 additions and 26 deletions

View file

@ -0,0 +1,43 @@
{
pkgs,
config,
lib,
...
}:
let
cfg = config.xyno.desktop.easyeffects;
in
{
options.xyno.desktop.easyeffects.enable = lib.mkEnableOption "enable easyeffects sound thingy";
options.xyno.desktop.easyeffects.wantedBy = lib.mkOption {
type = lib.types.str;
default = "niri.service";
};
options.xyno.desktop.easyeffects.package = lib.mkOption {
type = lib.types.package;
default = pkgs.easyeffects;
};
config = lib.mkIf cfg.enable {
environment.systemPackages = [ cfg.package ];
systemd.user.services.easyeffects = {
unitConfig = {
Description = "Easyeffects daemon";
Requires = [ "dbus.service" ];
After = [ cfg.wantedBy ];
PartOf = [
cfg.wantedBy
"pipewire.service"
];
};
wantedBy = [ cfg.wantedBy ];
serviceConfig = {
ExecStart = "${cfg.package}/bin/easyeffects --gapplication-service";
ExecStop = "${cfg.package}/bin/easyeffects --quit";
Restart = "on-failure";
RestartSec = 5;
};
};
};
}