Waybar
Waybar is a highly customizable Wayland bar.
Installation
Waybar can be installed from both configuration.nix and Home Manager:
❄︎ /etc/nixos/configuration.nix or ~/.config/home-manager/home.nix
programs.waybar.enable = true;
Configuration
Waybar can be configured using options found on the Home Manager Appendix. You can also find configuration options under home-manager/options/programs/waybar on mynixos.
❄︎ ~/.config/home-manager/home.nix
programs.waybar.settings.main = {
modules-right = ["clock"];
};
# programs.waybar.style = "";
Alternatively, you may configure using JSONC (and CSS) file(s) by:
❄︎ ~/.config/home-manager/home.nix
xdg.configFile."waybar/config.jsonc".source = ./waybar/config.jsonc;
# xdg.configFile."waybar/style.css".source = ./waybar/style.css;
Please refer to the default configuration (config.jsonc and style.css) and wiki for further information on configuration.
Troubleshooting
Icon Fonts Missing
The default configuration uses FontAwesome font, which is only available in font-awesome_4, not in font-awesome, font-awesome_6, font-awesome_5, etc.
You may simply install font-awesome_4
❄︎ /etc/nixos/configuration.nix
fonts.packages = with pkgs; [
font-awesome_4
];
or edit style.css to use your prefered font (e.g. font-awesome):
❄︎ /etc/nixos/configuration.nix
fonts.packages = with pkgs; [
font-awesome
];
≡︎ style.css
* {
/* `otf-font-awesome` is required to be installed for icons */
- font-family: FontAwesome, Roboto, Helvetica, Arial, sans-serif;
+ font-family: Roboto, Helvetica, Arial, sans-serif, "Font Awesome 7 Free";
font-size: 13px;
}