Movatterモバイル変換


[0]ホーム

URL:


Download

Download

Nix : the package manager

Current version

2.27.0

Multi-user installation (recommended)

Install Nix via therecommendedmulti-user installation:

$ sh <(curl -L https://nixos.org/nix/install) --daemon

We recommend the multi-user install if you are on Linux running systemd, with SELinux disabled and you can authenticate withsudo.

Single-user installation

Install Nix via thesingle-user installation:

$ sh <(curl -L https://nixos.org/nix/install) --no-daemon

Above command will perform a single-user installation of Nix, meaning thatnix is owned by the invoking user. You should run this under your usual user account, not asroot. The script will invokesudo to create/nix if it doesn’t already exist.

Which type of installation should you choose?

This depends on your requirements, but here is a short list of reasons whywe recommendmulti-user installation:

Pros

  • Better build isolation (and that is what Nix is all about)
  • Better security (a build can not write somewhere in your home)
  • Sharing builds between users

Cons

  • Requiresroot to run the daemon
  • More involved installation (creation ofnixbld* users, installing a systemd unit, …
  • Harder to uninstall

Multi-user installation

Updating to macOS 15 Sequoia

If you recently updated to macOS 15 Sequoia and are getting

error: the user '_nixbld1' in the group 'nixbld' does not exist

when running Nix commands, refer to GitHub issueNixOS/nix#10892 for instructions to fix your installation without reinstalling.

Install Nix via therecommendedmulti-user installation.Open a Terminal (by pressing [Cmd] + [Space] and typingterminal) and run the following command:

$ sh <(curl -L https://nixos.org/nix/install)

We believe we have ironed out how to cleanly support the read-only root on modern macOS. Pleaseconsult the manual on details what the installation script does.

Multi-user installation (Requires WSL with systemd enabled)

WSL versions 0.67.6 and above has systemd support.FollowMicrosoft’s systemd guideto configure it, and then install Nix using:

$ sh <(curl -L https://nixos.org/nix/install) --daemon

Single-user installation

Install Nix via thesingle-user installation

$ sh <(curl -L https://nixos.org/nix/install) --no-daemon

Start a Docker shell with Nix:

$ docker run -it nixos/nix

Or start a Docker shell with Nix exposing aworkdir directory:

$ mkdir workdir$ docker run -it -v $(pwd)/workdir:/workdir nixos/nix

Theworkdir example from above can be also used to start hacking on nixpkgs:

$ git clone --depth=1 https://github.com/NixOS/nixpkgs.git$ docker run -it -v $(pwd)/nixpkgs:/nixpkgs nixos/nixdocker>nix-build -I nixpkgs=/nixpkgs -A hello nixpkgs/default.nixdocker>find ./result # this symlink points to the build package

The following release items are also available:

NixOS : the Linux distribution

Current version

24.11

You can install NixOS on physical hardware by burning one of the CD images onto a blank CD/DVD disk, orby copying it onto a USB stick. Forinstallation instructions, please see themanual.

Graphical ISO image

The graphical installation ISO imagecontains the graphical NixOS installer as well as aDesktop Environment and several applications. It’s alive CD, so it allows you to get an impression of NixOS (and the Nix package manager) without installing it.

Note that while the image itself only comes in GNOME and Plasma variations, the included installer also allows installing various other desktops, or installing without a desktop.

Minimal ISO image

The minimal installation ISO imagedoes not contain the graphical user interface, and is therefore a lot smaller. You have torun the installer from the console. It contains a number of rescue tools.

NixOS AMIs

NixOS can be deployed to Amazon EC2 using our official AMI. We publishAMIs to all AWS regions for bothx86_64 andarm64 on a weekly basis.

We will start deprecating and garbage collecting images older than 90 daysin the future.This is why we suggest using a terraform data source or the AWS API to queryfor the latest AMI.

Via Terraform / OpenTofu

You can easily query for the latest AMI using a data source:

provider "aws" {  region= "eu-central-1"}data "aws_ami" "nixos_arm64" {  owners= ["427812963091"]  most_recent= true  filter {    name= "name"    values= ["nixos/24.11*"]  }  filter {    name= "architecture"    values= ["arm64"]# or "x86_64"  }}resource "aws_instance" "nixos_arm64" {  ami= data.aws_ami.nixos_arm64.id  instance_type= "t4g.nano"}

Via Command Line / AWS API

TheDescribeImages APIcan be used to query the latest AMI too:

aws ec2 describe-images --owners 427812963091  --filter 'Name=name,Values=nixos/24.11*' 'Name=architecture,Values=arm64' --query 'sort_by(Images, &CreationDate)'

Search for specific AMIs

You can also use theImage searcher to finda specific AMI. Do note that we intend to deprecate images older than 90 daysautomatically and we do not recommend hardcoding AMI ids.

The following release items are also available:


[8]ページ先頭

©2009-2025 Movatter.jp