Firefox: Difference between revisions

Klinger (talk | contribs)
m added link to firefox sync server
Eljamm (talk | contribs)
Line 21: Line 21:
Nightly builds are daily builds of Firefox from the central Mozilla repository.
Nightly builds are daily builds of Firefox from the central Mozilla repository.


To use them
==== Reproducible ====
This method uses flakes to pull in nightly versions of Firefox in a reproducible way, and is recommended for use. If you don't want to use flakes, check out the next section.
 
First, add the following inputs to your flake:
 
<syntaxhighlight lang="nix">
inputs = {
  firefox.url = "github:nix-community/flake-firefox-nightly";
  firefox.inputs.nixpkgs.follows = "nixpkgs";
};
</syntaxhighlight>
 
Then, using the [[Flakes#Using_nix_flakes_with_NixOS|specialArgs]] attribute to pass flake inputs to external configuration files, add the nightly package to your system:
 
<syntaxhighlight lang="nix">
{ pkgs, inputs, config, ... }:
{
  environment.systemPackages = [
    inputs.firefox.packages.${pkgs.system}.firefox-nightly-bin
  ];
}
</syntaxhighlight>
 
The downside of using this method is that you'll have to update the flake input before you can get a new nightly version, which also means that you might miss new builds since the flake lags behind the nightly release.
 
==== Non-reproducible (Impure) ====
Using this method is bad for reproducibility since it fetches resources from non-pinned URLs, but it also means you always get the latest nightly version when you build your system.
 
{{tip|1=If you don't want to use flakes but you still want to reproducibly install Firefox nightly, you might want to use this method with [https://github.com/nmattia/niv niv].}}
 
<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">
nixpkgs.overlays =
nixpkgs.overlays =
Line 34: Line 63:
programs.firefox.package = pkgs.latest.firefox-nightly-bin;
programs.firefox.package = pkgs.latest.firefox-nightly-bin;
</syntaxhighlight>
</syntaxhighlight>
Once you've added the overlay, you'll need to pass the <code>--impure</code> option to nix commands. For example, in order to build and activate your configuration, you'll have to run:
<syntaxHighlight lang="console">
$ nixos-rebuild switch --impure
</syntaxHighlight>


== Customizing with [[Home Manager]] ==
== Customizing with [[Home Manager]] ==