how do i install zen browser on nixos
- User
how do i install zen browser on nixos
- Assistant
Installing Zen Browser on NixOS
Zen Browser is not yet available in the official NixOS package repositories, but there are several community-supported methods to install it on NixOS. The most reliable and up-to-date approach is to use a Nix flake that packages Zen Browser, or to use the AppImage directly. Below are the main options:
1. Using a Community Nix Flake
Several users have created Nix flakes that package Zen Browser, wrapping the official AppImage and providing a desktop entry. The most referenced and up-to-date flake is 0xc000022070/zen-browser-flake[2][3][8].
Steps:
-
Add the Zen Browser flake as an input to your system or home-manager flake:
# In your flake.nix inputs.zen-browser = { url = "github:0xc000022070/zen-browser-flake"; inputs.nixpkgs.follows = "nixpkgs"; }; -
Add the package to your system or user environment. For example, in your
home.nix(if using home-manager):{ pkgs, ... }: { home.packages = [ inputs.zen-browser.packages.${pkgs.system}.default ]; } -
Run
nixos-rebuild switchorhome-manager switchas appropriate.
This will install Zen Browser and add a desktop entry. The flake is updated regularly and supports both x86_64 and aarch64[2][3].
2. Using the AppImage Directly (with Nix Wrapping)
If you do not use flakes, you can manually wrap the Zen Browser AppImage using a Nix expression. Here is a minimal example[2][4]:
{ appimageTools, fetchurl, ... }: let pname = "zen"; version = "latest"; src = fetchurl { url = "https://github.com/zen-browser/desktop/releases/latest/download/zen-x86_64.AppImage"; sha256 = "sha256-1s5T9adpo55cLk+ECaiYtZCEQtuAkmr7/4IuxRfsL4U="; # Update as needed }; appimageContents = appimageTools.extract { inherit pname version src; }; in appimageTools.wrapType2 { inherit pname version src; extraInstallCommands = '' install -m 444 -D ${appimageContents}/zen.desktop $out/share/applications/${pname}.desktop install -m 444 -D ${appimageContents}/zen.png $out/share/icons/hicolor/128x128/apps/${pname}.png ''; meta = { platforms = [ "x86_64-linux" ]; }; }-
Save this as
zen.nixand add it to yourenvironment.systemPackagesorhome.packages:environment.systemPackages = with pkgs; [ (callPackage ./zen.nix {}) ]; -
Rebuild your system or user environment.
3. Using Flatpak
Zen Browser is available on Flathub. You can install it with:
flatpak install flathub app.zenbrowser.ZenHowever, some users report issues with Flatpak sandboxing and integration on NixOS[1][6]. If you prefer a more native experience, use the flake or AppImage methods above.
Notes and Troubleshooting
- Hardware Acceleration: The AppImage may lack some libraries for hardware acceleration. The flake-based approach is generally more reliable for full feature support[2].
- Default Browser: If you want Zen to be your default browser, you may need to adjust your
xdgsettings or desktop environment preferences[4]. - Updating: If you use a manual Nix expression, you must update the version and hash yourself. Flake-based approaches are easier to keep up-to-date[2][8].
- No Official Nixpkgs Support (Yet): There is ongoing work to package Zen Browser for nixpkgs, but it is not yet merged[2].
Summary Table
Method Pros Cons How-to Reference Flake (recommended) Easy updates, desktop entry Requires flakes [2][3][8] AppImage (manual) No flakes needed Manual updates, less integration [2][4] Flatpak Easiest, official support Sandboxing, integration issues [1][6]
For most users, using the community flake is the best balance of ease and integration on NixOS. If you are new to flakes, there are many guides on converting your configuration to use them[3]. If you need a quick solution and are comfortable with Flatpak, that is also an option.
-
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.