Automated, pre-built, (potentially) pre-release packages for Wayland (sway/wlroots) tools for NixOS (nixos-unstable channel).
These packages are auto-updated to the latest version available from their upstream source control. This means this overlay and package set will often contain unreleased versions.
Community chat is on Matrix: #nixpkgs-wayland:matrix.org. We are not on Libera.
Started by: @colemickens and co-maintained by @Artturin (🙏).
The Cachix landing page for nixpkgs-wayland shows how to utilize the binary cache.
Packages from this overlay are regularly built against nixos-unstable and pushed to this cache.
We have multiple CI jobs:
- Update - this tries to advance nixpkgs and upgrade all packages. If it can successfully build them, the updates are push to master.
- Advance - this tries to advance nixpkgs without touching the packages. This can help show when nixpkgs upgrades via
nixos-unstablehas advanced into a state where we are broken building against it. - Build - this just proves that
masterwas working againstnixos-unstableat the point in time captured by whatever is inflake.lockonmaster.
We don't have CI on Pull Requests, but I keep an eye on it after merging external contributions.
- Build and run the Wayland-fixed up version of OBS-Studio:
nix shell "github:nix-community/nixpkgs-wayland#obs-studio" --command obs - Build and run
wev:nix run "github:nix-community/nixpkgs-wayland#wev"
-
Use as an overlay or package set via flakes:
{ inputs = { nixpkgs-wayland.url = "github:nix-community/nixpkgs-wayland"; # only needed if you use as a package set: nixpkgs-wayland.inputs.nixpkgs.follows = "nixpkgs"; }; outputs = inputs: { nixosConfigurations."my-laptop-hostname" = let system = "x86_64-linux"; in nixpkgs.lib.nixosSystem { inherit system; modules = [({pkgs, config, ... }: { config = { nix.settings = { # add binary caches trusted-public-keys = [ "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" "nixpkgs-wayland.cachix.org-1:3lwxaILxMRkVhehr5StQprHdEo4IrE8sRho9R9HOLYA=" ]; substituters = [ "https://cache.nixos.org" "https://nixpkgs-wayland.cachix.org" ]; }; # use it as an overlay nixpkgs.overlays = [ inputs.nixpkgs-wayland.overlay ]; # If using home-manager, you must also set home-manager.useGlobalPkgs = true; # or, pull specific packages (built against inputs.nixpkgs, usually `nixos-unstable`) environment.systemPackages = [ inputs.nixpkgs-wayland.packages.${system}.wev ]; }; })]; }; }; }
If you are not using Flakes, then consult the NixOS Wiki page on Overlays. Also, you can expand this section for a more literal, direct example. If you do pin, use a tool like niv to do the pinning so that you don't forget and wind up stuck on an old version.
{ config, lib, pkgs, ... }:
let
rev = "master"; # 'rev' could be a git rev, to pin the overlay.
url = "https://github.com/nix-community/nixpkgs-wayland/archive/${rev}.tar.gz";
waylandOverlay = (import "${builtins.fetchTarball url}/overlay.nix");
in
{
nixpkgs.overlays = [ waylandOverlay ];
environment.systemPackages = with pkgs; [ wayvnc ];
# ...
}You could write that to a file ./wayland.nix next to your configuration.nix and then use it like so:
{ config, lib, pkgs, ... }:
{
# ...
imports = [
# ...
./wayland.nix
];
}Non-NixOS users have many options, but here are two explicitly:
-
Activate flakes mode, then just run them outright like the first example in this README.
-
See the following details block for an example of how to add
nixpkgs-waylandas a user-level overlay and then install a package withnix-env.
-
There are two ways to activate an overlay for just your user:
- Add a new entry in ``~/.config/nixpkgs/overlays.nix`:
let url = "https://github.com/nix-community/nixpkgs-wayland/archive/master.tar.gz"; in [ (import "${builtins.fetchTarball url}/overlay.nix") ]
- Add a new file under a dir,
~/.config/nixpkgs/overlays/nixpkgs-wayland.nix:
let url = "https://github.com/nix-community/nixpkgs-wayland/archive/master.tar.gz"; in (import "${builtins.fetchTarball url}/overlay.nix")
Note, this method does not pin nixpkgs-wayland. That's left to the reader. (Just use flakes...)
- Then,
nix-envwill have access to the packages:
nix-env -iA neatvnc| Package | Description |
|---|---|
| aml | Another main loop |
| cage | Wayland kiosk that runs a single, maximized application |
| drm_info | Small utility to dump info about DRM devices |
| dunst | Lightweight and customizable notification daemon |
| eww | Widget system made in Rust to create widgets for any WM |
| foot | Fast, lightweight and minimalistic Wayland terminal emulator |
| freerdp3 | Remote Desktop Protocol Client |
| gebaar-libinput | Gebaar, A Super Simple WM Independent Touchpad Gesture Daemon for libinput |
| glpaper | Wallpaper program for wlroots based Wayland compositors such as sway that allows you to render glsl shaders as your wallpaper |
| grim | Grab images from a Wayland compositor |
| gtk-layer-shell | Library to create panels and other desktop components for Wayland using the Layer Shell protocol |
| i3status-rust | Very resource-friendly and feature-rich replacement for i3status |
| imv | Command line image viewer for tiling window managers |
| kanshi | Dynamic display configuration tool |
| lavalauncher | Simple launcher panel for Wayland desktops |
| libvncserver_master | VNC server library |
| mako | Lightweight Wayland notification daemon |
| neatvnc | VNC server library |
| new-wayland-protocols | Wayland protocol extensions |
| obs-wlrobs | Obs-studio plugin that allows you to screen capture on wlroots based wayland compositors |
| rootbar | Bar for Wayland WMs |
| salut | A sleek notification daemon |
| shotman | Uncompromising screenshot GUI for Wayland compositors |
| sirula | Simple app launcher for wayland written in rust |
| slurp | Select a region in a Wayland compositor |
| sway-unwrapped | I3-compatible tiling Wayland compositor |
| swaybg | Wallpaper tool for Wayland compositors |
| swayidle | Idle management daemon for Wayland |
| swaylock | Screen locker for Wayland |
| swaylock-effects | Screen locker for Wayland |
| swww | Efficient animated wallpaper daemon for wayland, controlled at runtime |
| waypipe | Network proxy for Wayland clients (applications) |
| wayvnc | VNC server for wlroots based Wayland compositors |
| wbg | Wallpaper application for Wayland compositors |
| wdisplays | Graphical application for configuring displays in Wayland compositors |
| wev | Wayland event viewer |
| wf-recorder | Utility program for screen recording of wlroots-based compositors |
| wl-clipboard | Command-line copy/paste utilities for Wayland |
| wl-gammarelay-rs | A simple program that provides DBus interface to control display temperature and brightness under wayland without flickering |
| wlay | Graphical output management for Wayland |
| wldash | Wayland launcher/dashboard |
| wlogout | Wayland based logout menu |
| wlr-randr | Xrandr clone for wlroots compositors |
| wlroots | Modular Wayland compositor library |
| wlsunset | Day/night gamma adjustments for Wayland |
| wlvncc | A Wayland Native VNC Client |
| wob | Lightweight overlay bar for Wayland |
| wofi | Launcher/menu program for wlroots based wayland compositors such as sway |
| wshowkeys | Displays keys being pressed on a Wayland session |
| wtype | xdotool type for wayland |
| xdg-desktop-portal-wlr | xdg-desktop-portal backend for wlroots |
- I recommend using
home-manager! - It has modules and options for:
swayobsand plugins!- more!
- You will likely want a default config file to place at
$HOME/.config/sway/config. You can use the upstream default as a starting point: https://github.com/swaywm/sway/blob/master/config.in - If you start
swayfrom a raw TTY, make sure you useexec swayso that if sway crashes, an unlocked TTY is not exposed.
- Everything should just work now (aka, wlroots/sway don't need patching).
- This is a known-good working config, at least at one point in time: mixins/nvidia.nix@ccd992
- Use
nix develop ./main.nu:./main.nu build- builds and caches derivations that don't exist in the cache, usenix-eval-jobs./main.nu advance- advances the flake inputs, runsmain build./main.nu update- advances the flake inputs, updates pkg revs, runsmain build
buildpushes to thenixpkgs-waylandcachix
If for some reason the overlay isn't progressing and you want to help,
just clone the repo, run nix develop -c ./main.nu update