Pure-source Nix flake for Donut Browser.
This flake exposes:
packages.<system>.{default,donutbrowser}apps.<system>.{default,donutbrowser}checks.<system>.defaultoverlays.default
- Linux with flakes enabled
- Supported systems:
x86_64-linuxaarch64-linux
Run directly from GitHub:
nix run github:HassiyYT/donutbrowser-nix#donutbrowserRun from a local checkout:
nix run .#donutbrowserInstall into your current user profile from GitHub:
nix profile install github:HassiyYT/donutbrowser-nix#donutbrowserInstall from a local checkout:
nix profile install .#donutbrowserThe installed executable is:
donutbrowserAdd the flake as an input in your flake.nix:
{
inputs.donutbrowser.url = "github:HassiyYT/donutbrowser-nix";
}Then install it system-wide:
{ inputs, pkgs, ... }:
{
environment.systemPackages = [
inputs.donutbrowser.packages.${pkgs.system}.donutbrowser
];
}If you prefer using pkgs.donutbrowser:
{ inputs, ... }:
{
nixpkgs.overlays = [ inputs.donutbrowser.overlays.default ];
}Then:
{ pkgs, ... }:
{
environment.systemPackages = [ pkgs.donutbrowser ];
}Add the same flake input:
{
inputs.donutbrowser.url = "github:HassiyYT/donutbrowser-nix";
}Then add the package to home.packages:
{ inputs, pkgs, ... }:
{
home.packages = [
inputs.donutbrowser.packages.${pkgs.system}.donutbrowser
];
}If you already use overlays in Home Manager:
{ inputs, ... }:
{
nixpkgs.overlays = [ inputs.donutbrowser.overlays.default ];
}Then:
{ pkgs, ... }:
{
home.packages = [ pkgs.donutbrowser ];
}You can reference this flake from another flake in any of these ways:
From GitHub:
inputs.donutbrowser.url = "github:HassiyYT/donutbrowser-nix";From a local checkout:
inputs.donutbrowser.url = "path:/home/h/dev/donutbrowser-nix";Or from the current directory while working inside the repo:
nix build .#donutbrowser
nix run .#donutbrowser
nix flake checkThis flake already declares:
https://hassiyyt.cachix.orghassiyyt.cachix.org-1:GPb2J+eS5AyHtVF9zQ+cchuQJl65WrxpcrdYsSiDjno=
If your Nix setup accepts flake-provided cache settings, nix run, nix build, nix profile install, NixOS, and Home Manager can use the cache automatically.
The flake still works without Cachix, but builds will be slower because more work happens locally.
If you want to trust the cache globally instead of relying on flake config, add this to your Nix settings:
{
nix.settings = {
extra-substituters = [ "https://hassiyyt.cachix.org" ];
extra-trusted-public-keys = [
"hassiyyt.cachix.org-1:GPb2J+eS5AyHtVF9zQ+cchuQJl65WrxpcrdYsSiDjno="
];
};
}The package wrapper is tuned for Linux desktop use and sets:
NIX_LDNIX_LD_LIBRARY_PATHLD_LIBRARY_PATHPLAYWRIGHT_NODEJS_PATHDONUT_PATCHELF_BINMOZ_ENABLE_WAYLAND=1by defaultGDK_BACKEND=wayland,x11by default
Managed browser binaries such as Wayfern and Camoufox are launched on NixOS through the package-provided runtime setup, so a separate system programs.nix-ld configuration is not required.
For Wayland sessions, the default launch path is recommended:
donutbrowserIf you want to force a pure Wayland launch check:
env -u DISPLAY GDK_BACKEND=wayland donutbrowserXorg is supported too. In many X11 sessions, the default launch path already works:
donutbrowserIf you want to force X11 explicitly:
env GDK_BACKEND=x11 MOZ_ENABLE_WAYLAND=0 donutbrowserThis repository exports:
packages.<system>.defaultpackages.<system>.donutbrowserpackages.<system>.pnpm-depspackages.<system>.cargo-depsapps.<system>.defaultapps.<system>.donutbrowserchecks.<system>.defaultoverlays.default
Build exactly what CI builds:
nix build .#donutbrowser --print-build-logsRun the packaged app locally:
nix run .#donutbrowserCheck the flake for the current system:
nix flake checkUpdate to the latest upstream Donut Browser release:
./scripts/update-version.shCheck whether a newer release exists:
./scripts/update-version.sh --checkRefresh carried packaging patches against a specific upstream release using your local ~/dev/donutbrowser checkout:
./scripts/refresh-patches.sh --version 0.20.4Repository automation and required GitHub settings are documented in ./.github/REPOSITORY_SETTINGS.md.