Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion modules/services/window-managers/i3-sway/sway.nix
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,12 @@ let
checkPhase = lib.optionalString cfg.checkConfig ''
export DBUS_SESSION_BUS_ADDRESS=/dev/null
export XDG_RUNTIME_DIR=$(mktemp -d)
${pkgs.xvfb-run}/bin/xvfb-run ${cfg.package}/bin/sway --config "$target" --validate --unsupported-gpu
${pkgs.xvfb-run}/bin/xvfb-run ${cfg.package}/bin/sway --config "$target" --validate --unsupported-gpu || {
echo "Checking the sway config file failed. Normally, this happens because there are errors in the config file."
echo "But the check can also fail if the sway config file has dependencies on configuration that is not available in the Nix build sandbox (e.g. custom keyboard layouts defined in the NixOS configuration; background images in the user's home directory)."
echo "In that case, it may be necessary to set 'config.wayland.windowManager.sway.checkConfig = false;'."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
echo "In that case, it may be necessary to set 'config.wayland.windowManager.sway.checkConfig = false;'."
echo "In that case, it may be necessary to set 'wayland.windowManager.sway.checkConfig = false;'."

exit 1
}
'';

text = concatStringsSep "\n" (
Expand Down
Loading