User:Alxhr0/Nix on openrc

From Gentoo Wiki
Jump to:navigation Jump to:search
Resources

Nix is a purely functional package manager from the NixOS Project.

Installation

Note
The Nix package manager is not currently available in the main Gentoo ebuild repository, it needs to be installed from: https://nixos.org/download.

To install Nix run. Make sure to choose the multi-user installation. :

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

Service

openRC

Nix doesn't have an openRC service, but one can be easily made:

FILE /etc/init.d/nix-daemonMake a nix-daemon service for openRC
#!/sbin/openrc-run

name=$RC_SVCNAME
description="Nix Daemon"
supervisor="supervise-daemon"
command="/nix/var/nix/profiles/default/bin/nix-daemon"
command_args="--daemon"

Then enable it with

root #rc-update add nix-daemon default
Note
It's recommended to reboot after installing Nix.