mew
This commit is contained in:
parent
b69b80c93f
commit
11bd02cf4f
18 changed files with 177 additions and 26 deletions
43
modules/desktop/easyeffects.nix
Normal file
43
modules/desktop/easyeffects.nix
Normal 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;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue