From d38dbec8094681a02812adda752f934c3489b6db Mon Sep 17 00:00:00 2001 From: Even Brenden Date: Thu, 8 Dec 2022 12:24:04 +0100 Subject: [PATCH] parcellite: add extraOptions option Even though `--no-icon` is currently the only viable option for both parcellite and clipit, other options may be added to later releases. --- modules/services/parcellite.nix | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/modules/services/parcellite.nix b/modules/services/parcellite.nix index 6ed9946b4..a5cf8859e 100644 --- a/modules/services/parcellite.nix +++ b/modules/services/parcellite.nix @@ -12,6 +12,15 @@ in { options.services.parcellite = { enable = mkEnableOption "Parcellite"; + extraOptions = mkOption { + type = types.listOf types.str; + default = [ ]; + example = [ "--no-icon" ]; + description = '' + Command line arguments passed to Parcellite. + ''; + }; + package = mkOption { type = types.package; default = pkgs.parcellite; @@ -40,7 +49,9 @@ in { Install = { WantedBy = [ "graphical-session.target" ]; }; Service = { - ExecStart = "${cfg.package}/bin/${cfg.package.pname}"; + ExecStart = "${cfg.package}/bin/${cfg.package.pname} ${ + lib.concatStringsSep " " cfg.extraOptions + }"; Restart = "on-abort"; }; };