Skip to content

Package manager install on Debian, Ubuntu and Alpine #1141

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ngaro
Copy link

@ngaro ngaro commented May 10, 2025

Documents installation with package manager on popular distributions. This is tested on the newest stable version of each of those:

  • Debian 12
  • Ubuntu 24.04
  • Alpine 3.21

Documents installation with package manager on popular distributions.
This is tested on the newest stable version of each of those:
- Debian 12
- Ubuntu 24.04
- Alpine 3.21
@ngaro ngaro requested a review from a team as a code owner May 10, 2025 10:47
@ngaro
Copy link
Author

ngaro commented May 10, 2025

Don't merge this PR just yet. Although it installs fine, it doesn't configure all settings. The tutorials will not work if some extra config is not done.

On Arch Linux, you can alternatively [install Nix through `pacman`](https://wiki.archlinux.org/title/Nix#Installation).
On most distributions you can also install it with the package manager:
* On Arch Linux the different types of installation are documented [on the Arch Linux wiki](https://wiki.archlinux.org/title/Nix#Installation).
* On Debian and Ubuntu (and distributions based on these like Mint, MX, ...) you can use `apt install nix`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also nix-setup-systemd for a more complete and useful install.

@hansat299
Copy link

I would like to make some remarks about the part of this chapter which refers to installing nix on a linux distribution using the distribution package manager.

About Arch Linux:
Arch Linux uses the package manager pacman and refers to the package nix and you can install it using pacman -S nix. The other options are the nix supported install script, Lix and Zero to Nix. The first one is already mentioned above on the page. In my opinion I would not include the last two in this chapter because it is a bit out of scope.

The nix package is multi-user because it contains the installation of the nix-daemon.

About Debian/Ubuntu
The Debian nix package is for a local user. For multi-user installation, Debian offers the nix-setup-systemd, for which Debian will install the nix package as well

About Alpine:
The Alpine nix package is multi-user because it contains the nix-daemon installation.

I would advise to add the minimum configuration for nix because the documents is also mend for beginners. You could format the information with a drop down. The configurations are:

  • Add the user into the nix-users group ...command..
  • Define the nix-channel ...command...

For more detailed installation notes, I advise to link this paragraph to https://wiki.nixos.org/wiki/Nix_Installation_Guide and visa versa. So that the page references reader to related observations outside nix.dev.

@ngaro
Copy link
Author

ngaro commented Jul 28, 2025

I am just starting with Nix. Odds are that I will make mistakes when my instructions become more detailed.
Can someone with experience complete this ?

@fricklerhandwerk
Copy link
Collaborator

Thanks @ngaro @hansat299 for your contributions. I'm a bit hesitant to pick this up as is, because starting yet another collection of notes won't be an improvement over the pile of words in the wiki or anywhere else, but simply add another place with potential for divergent information that someone needs to keep up to date. What we'd actually need here is something along the lines as what @imincik added for NGIpkgs: Instructions (example) that are automatically tested against the actual installers on those operating systems.

Now that code will probably be rather hard to read because it's built for a particular purpose, but the general idea would still apply here. It would need a bit of effort to adapt to nix.dev, and while upstreaming the work in NGIpkgs is definitely planned, it's not a primary goal this year and I don't want to make promises I can't keep.

If you're interested in having this, I'd strongly encourage you to work on top of that material and would gladly merge anything that has green tests (i.e. can be reviewed by eyeballing).

@hansat299
Copy link

  1. The initiative of adding something to nix.dev are missing stones I met installing nix on Debian. I would like to share those to others for which they need to take care of if they install nix.
  2. I agree partly with your hesitation, but do you want to wait one, two years to let the starter wait to discover or ask about missing stones? This would stop progress of nix.dev with something a starter or medium user needs.
  3. I am not familiar with nix package building. If something is not working with a nix/nixos project. I would like to share solutions in a wiki or other form to help other users to proceed. So working with ngipkgs is a step too far for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants