Different versions of software

NixOS development is that much open and avoids such a fragmentation!
Thanks contributors for your work!

How is this feasible?

  1. Install (and name) different overlays for one package.
    Can I get 3 variants of one Firefox by applying (plain) overlay1, overlay2, “brocolly_overlay” and be able to simultaneously run 2 browser sessions: Firefox with overlay1 and Firefox with overlay2?

  2. Install 2 stacks of GNOME - 3.10 and 3.12 (NixPills, Chapter 1). What should I use? “nix-env”, “configuration.nix”?
    Switch between them without rebuild. How?

  3. Consider installing 4 versions of Opera altogether:

    • from nixpkgs: opera-66…
    • from nixpkgs-unstable: opera-67…
    • from nixpkgs (version is same as in nixpkgs, but with an overlay applied)
    • from different repository: opera-68…

How can I run (start) specific version (one of four Opera versions installed)?

  • Can I do that, using KDE Plasma menu?
    Search for “opera”, get 4 versions of Opera, start one of them.
    Search for “opera-66”. Version and overlay usage are not “very much” specified. Therefore, get 2 versions of Opera to choose from: one with an overlay, another without an overlay.
    Search for “opera-67.0.3575.31”. Get 1 version of Opera (version is clearly specified).
  • Somehow edit “configuration.nix” file …?
    Then, enter following in the terminal: “opera”. Opera version specified for a user in the “configuration.nix” as a default should start.

Although, it’s uncommon to encounter multiple versions of a package usually on https://nixos.org/nixos/packages.html?channel=nixos-20.03, is that right?

I have found that:

  • “nix-env -f nixpkgs-unstable -i (package_name)” installs latest version of a package from nixpkgs-unstable.
  • In “configuration.nix”, at least 1 overlay can be configured with:
    nixpkgs.overlays = [ … ];
1 Like

I don’t have time to write an in-depth reply (or dig up the right documentation) right now, but as a quick pointer, I think nix-shell is the tool with which you can achieve many of your goals, especially with the -I nixpkgs=/path/to/another/nixpkgs option to run it with different branches of the nixpkgs tree.

1 Like

Thank you for your answer, @raboof. I don’t know, what nix-shell is used for. Like I suppose, for efficient overlays testing.

Can I install packages once, permanently, without need to (re)install them once and then with nix-shell?

In my opinion, both the landing page and the documentation currently
need to be updated, latter looks like wiki without an introduction. It
seems, that you should be a Linux programmer to understand them.

Besides the documentation could less include ambiguous sentences, an
introduction could explain terminology:

  1. Build, compile. What is the difference?
  2. Continuous build process?
  3. Persistent environment (from landing page)?
  4. Prebuilt binaries (from small amount of text on
    Reading the documentation for the Nix programming language usually
    brings me a lot more questions, than reading discourse, although I am
    not object to doing it.

I have got used to pick questions, explanations and code blocks from
discourse. It embraced the Nix programming language in practice.