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.
This commit is contained in:
Even Brenden 2022-12-08 12:24:04 +01:00 committed by Robert Helgesson
parent e70550577f
commit d38dbec809
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89

View file

@ -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";
};
};