Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions modules/services/easyeffects.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ in {
</programlisting>
to your system configuration for the daemon to work correctly'';

package = mkOption {
type = types.package;
default = pkgs.easyeffects;
defaultText = literalExpression "pkgs.easyeffects";
description = "The <literal>easyeffects</literal> package to use.";
};

preset = mkOption {
type = types.str;
default = "";
Expand All @@ -38,7 +45,7 @@ in {
# running easyeffects will just attach itself to gapplication service
# at-spi2-core is to minimize journalctl noise of:
# "AT-SPI: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was not provided by any .service files"
home.packages = with pkgs; [ easyeffects at-spi2-core ];
home.packages = with pkgs; [ cfg.package at-spi2-core ];

systemd.user.services.easyeffects = {
Unit = {
Expand All @@ -52,8 +59,8 @@ in {

Service = {
ExecStart =
"${pkgs.easyeffects}/bin/easyeffects --gapplication-service ${presetOpts}";
ExecStop = "${pkgs.easyeffects}/bin/easyeffects --quit";
"${cfg.package}/bin/easyeffects --gapplication-service ${presetOpts}";
ExecStop = "${cfg.package}/bin/easyeffects --quit";
Restart = "on-failure";
RestartSec = 5;
};
Expand Down