I have recently started building up a fresh NixOS install from the minimal ISO. I installed sway per the wiki but with some changes. I removed dmenu and added waybar and wofi as shown below.
programs.sway = {
enable = true;
wrapperFeatures.gtk = true; # so that gtk works properly
extraPackages = with pkgs; [
swaylock
swayidle
wl-clipboard
mako # notification daemon
alacritty # terminal
wofi # launcher/menu program
waybar # status bar
];
};
My system still boots to the terminal and I run sway
and everything appears fine. The MOD key is bound to my keyboards OS key. Typing MOD-Enter opens alacritty. The bar is definitely waybar. All looks good.
I then installed home-manager and modified my configuration to use my home.nix file to configure wayland and sway as shown below.
wayland.windowManager.sway = {
enable = true;
wrapperFeatures.gtk = true;
};
home.packages = with pkgs; [
swaylock
swayidle
wl-clipboard
mako # notification daemon
alacritty # terminal
wofi # launcher/menu program
waybar # status bar
];
I did also have to add the following to my configuration after the switch to get sway to boot or I would get similar errors as seen in this thread (Sway from Home-Manager?).
# Hardware support
hardware = {
opengl = {
enable = true;
driSupport = true;
};
};
I did also add the following to my configuration, but it shouldn’t have any bearing on sway’s performance.
boot.kernelModules = [ "kvm-intel" ];
I rebuilt the system and home-manager and ran sway
from my console to launch sway. It looks the same but the behavior is way off. Note I made no modifications to the sway config. It appears that
- The MOD key is no longer the OS key but it is now Alt.
- The default terminal emulator (Alt-Enter) is not Alacritty. When I run
echo $TERM
in the terminal it returnsrxvt-unicode-256color
so I assume it is running the rxvt terminal emulator. I have no experience with this terminal. Alacritty is installed but it is not the default. - The default bar is swaybar and not waybar. I checked this with
ps -aux
. - When I run alacritty from the rxvt terminal, it does open but the kerning is all messed up. Some letters are spaced far apart and sometimes they overlap. rxvt does not have this problem.
Here is a link to my repo containing all my configuration files if that would be useful.
https://gitlab.com/djacu2/dotfiles-nixos