From 1786883425208d3bf726ab6a1889beddeb46cdbc Mon Sep 17 00:00:00 2001 From: Anton Date: Fri, 6 Jan 2023 06:49:20 +0200 Subject: [PATCH] easyeffects: add package option (#3568) --- modules/services/easyeffects.nix | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/modules/services/easyeffects.nix b/modules/services/easyeffects.nix index 001ff5d02..9dd01b947 100644 --- a/modules/services/easyeffects.nix +++ b/modules/services/easyeffects.nix @@ -20,6 +20,13 @@ in { to your system configuration for the daemon to work correctly''; + package = mkOption { + type = types.package; + default = pkgs.easyeffects; + defaultText = literalExpression "pkgs.easyeffects"; + description = "The easyeffects package to use."; + }; + preset = mkOption { type = types.str; default = ""; @@ -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 = { @@ -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; };