Skip to content

HassiyYT/donutbrowser-nix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

donutbrowser-nix

Pure-source Nix flake for Donut Browser.

This flake exposes:

  • packages.<system>.{default,donutbrowser}
  • apps.<system>.{default,donutbrowser}
  • checks.<system>.default
  • overlays.default

Requirements

  • Linux with flakes enabled
  • Supported systems:
    • x86_64-linux
    • aarch64-linux

Try Without Installing

Run directly from GitHub:

nix run github:HassiyYT/donutbrowser-nix#donutbrowser

Run from a local checkout:

nix run .#donutbrowser

Install For One User

Install into your current user profile from GitHub:

nix profile install github:HassiyYT/donutbrowser-nix#donutbrowser

Install from a local checkout:

nix profile install .#donutbrowser

The installed executable is:

donutbrowser

Install System-Wide On NixOS

Add 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
  ];
}

Optional Overlay Style

If you prefer using pkgs.donutbrowser:

{ inputs, ... }:
{
  nixpkgs.overlays = [ inputs.donutbrowser.overlays.default ];
}

Then:

{ pkgs, ... }:
{
  environment.systemPackages = [ pkgs.donutbrowser ];
}

Install With Home Manager

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
  ];
}

Optional Overlay Style

If you already use overlays in Home Manager:

{ inputs, ... }:
{
  nixpkgs.overlays = [ inputs.donutbrowser.overlays.default ];
}

Then:

{ pkgs, ... }:
{
  home.packages = [ pkgs.donutbrowser ];
}

Flake Usage In Another flake.nix

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 check

Using Cachix

With Cachix Automatically

This flake already declares:

  • https://hassiyyt.cachix.org
  • hassiyyt.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.

Without Cachix Or Without Trusting Flake Config

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="
    ];
  };
}

Wayland And Xorg

The package wrapper is tuned for Linux desktop use and sets:

  • NIX_LD
  • NIX_LD_LIBRARY_PATH
  • LD_LIBRARY_PATH
  • PLAYWRIGHT_NODEJS_PATH
  • DONUT_PATCHELF_BIN
  • MOZ_ENABLE_WAYLAND=1 by default
  • GDK_BACKEND=wayland,x11 by 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.

Wayland

For Wayland sessions, the default launch path is recommended:

donutbrowser

If you want to force a pure Wayland launch check:

env -u DISPLAY GDK_BACKEND=wayland donutbrowser

Xorg / X11

Xorg is supported too. In many X11 sessions, the default launch path already works:

donutbrowser

If you want to force X11 explicitly:

env GDK_BACKEND=x11 MOZ_ENABLE_WAYLAND=0 donutbrowser

Flake Outputs

This repository exports:

  • packages.<system>.default
  • packages.<system>.donutbrowser
  • packages.<system>.pnpm-deps
  • packages.<system>.cargo-deps
  • apps.<system>.default
  • apps.<system>.donutbrowser
  • checks.<system>.default
  • overlays.default

Development

Build exactly what CI builds:

nix build .#donutbrowser --print-build-logs

Run the packaged app locally:

nix run .#donutbrowser

Check the flake for the current system:

nix flake check

Update to the latest upstream Donut Browser release:

./scripts/update-version.sh

Check whether a newer release exists:

./scripts/update-version.sh --check

Refresh carried packaging patches against a specific upstream release using your local ~/dev/donutbrowser checkout:

./scripts/refresh-patches.sh --version 0.20.4

Repository automation and required GitHub settings are documented in ./.github/REPOSITORY_SETTINGS.md.

About

Always up-to-date Nix package for Donutbrowser with hourly updates and multi-platform caching

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors