Skip to content

Commit

Permalink
pulseeffects: add option to specify package (nix-community#1825)
Browse files Browse the repository at this point in the history
  • Loading branch information
moni-dz authored and aakropotkin committed Feb 28, 2021
1 parent adb79d8 commit 7c92cae
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions modules/services/pulseeffects.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ in {
options.services.pulseeffects = {
enable = mkEnableOption "Pulseeffects daemon";

package = mkOption {
type = types.package;
default = pkgs.pulseeffects;
defaultText = literalExample "pkgs.pulseeffects";
description = "Pulseeffects package to use.";
example = literalExample "pkgs.pulseeffects-pw";
};

preset = mkOption {
type = types.str;
default = "";
Expand All @@ -28,7 +36,7 @@ in {
# running pulseeffects 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 = [ pkgs.pulseeffects pkgs.at-spi2-core ];
home.packages = [ cfg.package pkgs.at-spi2-core ];

# Will need to add `services.dbus.packages = with pkgs; [ gnome3.dconf ];`
# to /etc/nixos/configuration.nix for daemon to work correctly
Expand All @@ -45,8 +53,8 @@ in {

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

0 comments on commit 7c92cae

Please sign in to comment.