about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/window-managers/sway/wrapper.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/applications/window-managers/sway/wrapper.nix')
-rw-r--r--nixpkgs/pkgs/applications/window-managers/sway/wrapper.nix7
1 files changed, 4 insertions, 3 deletions
diff --git a/nixpkgs/pkgs/applications/window-managers/sway/wrapper.nix b/nixpkgs/pkgs/applications/window-managers/sway/wrapper.nix
index bd59ac5fa459..7c59b8b7cde4 100644
--- a/nixpkgs/pkgs/applications/window-managers/sway/wrapper.nix
+++ b/nixpkgs/pkgs/applications/window-managers/sway/wrapper.nix
@@ -3,6 +3,7 @@
 , makeWrapper, symlinkJoin, writeShellScriptBin
 , withBaseWrapper ? true, extraSessionCommands ? "", dbus
 , withGtkWrapper ? false, wrapGAppsHook, gdk-pixbuf
+, extraOptions ? [] # E.g.: [ "--verbose" ]
 }:
 
 assert extraSessionCommands != "" -> withBaseWrapper;
@@ -39,9 +40,9 @@ in symlinkJoin {
     export dontWrapGApps=true
     ${optionalString withGtkWrapper "wrapGAppsHook"}
     wrapProgram $out/bin/sway \
-      --prefix PATH : "${swaybg}/bin" ${optionalString withGtkWrapper ''\
-        "''${gappsWrapperArgs[@]}"
-      ''}
+      --prefix PATH : "${swaybg}/bin" \
+      ${optionalString withGtkWrapper ''"''${gappsWrapperArgs[@]}"''} \
+      ${optionalString (extraOptions != []) "${concatMapStrings (x: " --add-flags " + x) extraOptions}"}
   '';
 
   passthru.providedSessions = [ "sway" ];