1
0
mirror of https://github.com/nix-community/home-manager synced 2024-07-01 19:08:33 +02:00

easyeffects: add package option (#3568)

This commit is contained in:
Anton 2023-01-06 06:49:20 +02:00 committed by GitHub
parent 3ecd5305a4
commit 1786883425
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20,6 +20,13 @@ in {
</programlisting> </programlisting>
to your system configuration for the daemon to work correctly''; 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 { preset = mkOption {
type = types.str; type = types.str;
default = ""; default = "";
@ -38,7 +45,7 @@ in {
# running easyeffects will just attach itself to gapplication service # running easyeffects will just attach itself to gapplication service
# at-spi2-core is to minimize journalctl noise of: # 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" # "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 = { systemd.user.services.easyeffects = {
Unit = { Unit = {
@ -52,8 +59,8 @@ in {
Service = { Service = {
ExecStart = ExecStart =
"${pkgs.easyeffects}/bin/easyeffects --gapplication-service ${presetOpts}"; "${cfg.package}/bin/easyeffects --gapplication-service ${presetOpts}";
ExecStop = "${pkgs.easyeffects}/bin/easyeffects --quit"; ExecStop = "${cfg.package}/bin/easyeffects --quit";
Restart = "on-failure"; Restart = "on-failure";
RestartSec = 5; RestartSec = 5;
}; };