fix(sway): add --unsupported-gpu conditionally
Sway refuses to run with nvidia drivers loaded.
This commit is contained in:
parent
3e32d04460
commit
a074a5a652
|
@ -3,6 +3,7 @@
|
|||
, config
|
||||
, ... }: with lib; let
|
||||
gui = with config.global.gui; ( enable && session );
|
||||
nvidia = with config.global.gui; ( type == "nvidia" || type == "prime" );
|
||||
in mkIf gui {
|
||||
services.xserver.displayManager.sessionPackages = [
|
||||
(pkgs.writeTextFile {
|
||||
|
@ -21,7 +22,7 @@ in mkIf gui {
|
|||
for profile in ''${(z)NIX_PROFILES}; do
|
||||
fpath+=($profile/share/zsh/site-functions $profile/share/zsh/$ZSH_VERSION/functions $profile/share/zsh/vendor-completions)
|
||||
done
|
||||
exec sway --unsupported-gpu
|
||||
exec sway ${if nvidia then "--unsupported-gpu" else ""}
|
||||
'';
|
||||
checkPhase = ''
|
||||
${pkgs.stdenv.shellDryRun} "$target"
|
||||
|
|
Loading…
Reference in a new issue