nixos/sway: add programs.sway.extraOptions
This commit is contained in:
parent
a06925d8c6
commit
ad8a430a3a
@ -28,6 +28,7 @@ let
|
|||||||
|
|
||||||
swayPackage = pkgs.sway.override {
|
swayPackage = pkgs.sway.override {
|
||||||
extraSessionCommands = cfg.extraSessionCommands;
|
extraSessionCommands = cfg.extraSessionCommands;
|
||||||
|
extraOptions = cfg.extraOptions;
|
||||||
withBaseWrapper = cfg.wrapperFeatures.base;
|
withBaseWrapper = cfg.wrapperFeatures.base;
|
||||||
withGtkWrapper = cfg.wrapperFeatures.gtk;
|
withGtkWrapper = cfg.wrapperFeatures.gtk;
|
||||||
};
|
};
|
||||||
@ -67,6 +68,21 @@ in {
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
extraOptions = mkOption {
|
||||||
|
type = types.listOf types.str;
|
||||||
|
default = [];
|
||||||
|
example = [
|
||||||
|
"--verbose"
|
||||||
|
"--debug"
|
||||||
|
"--unsupported-gpu"
|
||||||
|
"--my-next-gpu-wont-be-nvidia"
|
||||||
|
];
|
||||||
|
description = ''
|
||||||
|
Command line arguments passed to launch Sway. Please DO NOT report
|
||||||
|
issues if you use an unsupported GPU (proprietary drivers).
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
extraPackages = mkOption {
|
extraPackages = mkOption {
|
||||||
type = with types; listOf package;
|
type = with types; listOf package;
|
||||||
default = with pkgs; [
|
default = with pkgs; [
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
, makeWrapper, symlinkJoin, writeShellScriptBin
|
, makeWrapper, symlinkJoin, writeShellScriptBin
|
||||||
, withBaseWrapper ? true, extraSessionCommands ? "", dbus
|
, withBaseWrapper ? true, extraSessionCommands ? "", dbus
|
||||||
, withGtkWrapper ? false, wrapGAppsHook, gdk-pixbuf
|
, withGtkWrapper ? false, wrapGAppsHook, gdk-pixbuf
|
||||||
|
, extraOptions ? [] # E.g.: [ "--verbose" ]
|
||||||
}:
|
}:
|
||||||
|
|
||||||
assert extraSessionCommands != "" -> withBaseWrapper;
|
assert extraSessionCommands != "" -> withBaseWrapper;
|
||||||
@ -39,9 +40,9 @@ in symlinkJoin {
|
|||||||
export dontWrapGApps=true
|
export dontWrapGApps=true
|
||||||
${optionalString withGtkWrapper "wrapGAppsHook"}
|
${optionalString withGtkWrapper "wrapGAppsHook"}
|
||||||
wrapProgram $out/bin/sway \
|
wrapProgram $out/bin/sway \
|
||||||
--prefix PATH : "${swaybg}/bin" ${optionalString withGtkWrapper ''\
|
--prefix PATH : "${swaybg}/bin" \
|
||||||
"''${gappsWrapperArgs[@]}"
|
${optionalString withGtkWrapper ''"''${gappsWrapperArgs[@]}"''} \
|
||||||
''}
|
${optionalString (extraOptions != []) "${concatMapStrings (x: " --add-flags " + x) extraOptions}"}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
passthru.providedSessions = [ "sway" ];
|
passthru.providedSessions = [ "sway" ];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user