To install Zen Browser on NixOS, you can utilize community-maintained Nix flakes that package Zen Browser for seamless integration. Here's a step-by-step guide:
-
Enable Flakes and Nix Command: Ensure that your NixOS configuration supports flakes and the Nix command by adding the following line to your configuration.nix:
nix.settings.experimental-features = ["nix-command" "flakes"];
-
Add the Zen Browser Flake: In your flake.nix, include the Zen Browser flake as an input. For instance, using the flake maintained by MarceColl:
{
inputs = {
zen-browser = {
url = "github:MarceColl/zen-browser-flake";
};
# ... other inputs
};
outputs = { self, nixpkgs, zen-browser, ... }@inputs: {
nixosConfigurations.your-hostname = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
# ... your other modules
{
nixpkgs.overlays = [ zen-browser.overlay ];
environment.systemPackages = [
zen-browser.packages."x86_64-linux".default
];
}
];
};
};
}
This configuration adds the Zen Browser flake and includes it in your system packages[1].
-
Rebuild Your System: Apply the changes by rebuilding your NixOS configuration:
sudo nixos-rebuild switch
-
Launch Zen Browser: After the rebuild, you can start Zen Browser by running:
zen
Alternatively, if you use Home Manager, you can integrate Zen Browser by adding the flake to your flake.nix and importing the Home Manager module:
{
inputs = {
zen-browser = {
url = "github:LunaCOLON3/zen-browser-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
# ... other inputs
};
outputs = { self, nixpkgs, zen-browser, ... }@inputs: {
homeConfigurations.your-username = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux;
modules = [
# ... your other modules
zen-browser.homeManagerModules.zen-browser
{
programs.zen-browser.enable = true;
}
];
};
};
}
This setup enables Zen Browser through Home Manager[2].
By following these steps, you can successfully install and run Zen Browser on your NixOS system.