{ config, lib, pkgs, ... }: let sway-config = pkgs.writeTextFile { name = "config"; text = '' # Default config for sway # # Copy this to ~/.config/sway/config and edit it to your liking. # # Read `man 5 sway` for a complete reference. ### Variables # # Logo key. Use Mod1 for Alt. set $mod Mod4 # set $mod Mod1 # Home row direction keys, like vim set $left h set $down j set $up k set $right l # Your preferred terminal emulator set $term ${pkgs.alacritty}/bin/alacritty # Your preferred application launcher # Note: it's recommended that you pass the final command to sway # set $menu dmenu_path | dmenu | xargs swaymsg exec set $menu ${pkgs.wofi}/bin/wofi --show drun --gtk-dark # Do not show a title bar on windows default_border pixel 2 bindsym $mod+grave exec $term exec ${pkgs.alacritty}/bin/alacritty include ~/.config/sway/config.d/*.conf include /etc/sway/config.d/* ''; }; in { imports = []; environment.systemPackages = with pkgs; [ alacritty firefox ]; hardware.opengl.enable = true; environment.sessionVariables = { WLR_RENDERER_ALLOW_SOFTWARE = "1"; }; programs.sway = { enable = true; wrapperFeatures.gtk = true; extraOptions = [ "--debug" "--config" "${sway-config}" "--unsupported-gpu" ]; }; programs.gnupg.agent = { enable = true; enableSSHSupport = true; }; }