diff --git a/home/sway/nixos.nix b/home/sway/nixos.nix index f6900dd3..8c01337b 100644 --- a/home/sway/nixos.nix +++ b/home/sway/nixos.nix @@ -12,7 +12,21 @@ in mkIf gui { [Desktop Entry] Name=Sway Comment=An i3-compatible Wayland compositor - Exec=sway --unsupported-gpu + Exec=${pkgs.writeTextFile { + name = "sway-wrapper"; + executable = true; + text = '' + #!${pkgs.zsh}/bin/zsh + SHLVL=0 + 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 + ''; + checkPhase = '' + ${pkgs.stdenv.shellDryRun} "$target" + ''; + }} Type=Application ''; } // { providedSessions = [ pkgs.sway.meta.mainProgram ]; })