* Start the Nix daemon to enable multi-user package management in

NixOS.

svn path=/nixos/trunk/; revision=7291
This commit is contained in:
Eelco Dolstra 2006-12-09 03:11:14 +00:00
parent f049c35a86
commit 2fe4badb9a
4 changed files with 24 additions and 2 deletions

View File

@ -105,6 +105,10 @@ udevtrigger
udevsettle # wait for udev to finish
# !!! Hack - should be done with udev rules.
chmod 666 /dev/null
# Enable a password-less root login.
source @accounts@
@ -164,7 +168,7 @@ cat > /etc/profile <<EOF
export PATH=$PATH
export MODULE_DIR=$MODULE_DIR
export NIX_CONF_DIR=/nix/etc/nix
if test "\$HOME" != root; then
if test "\$USER" != root; then
export NIX_REMOTE=daemon
fi

View File

@ -135,6 +135,11 @@ rec {
inherit (pkgs) openssh;
})
# Nix daemon - required for multi-user Nix.
(import ../upstart-jobs/nix-daemon.nix {
inherit nix;
})
# X server.
(import ../upstart-jobs/xserver.nix {
inherit (pkgs) genericSubstituter;

View File

@ -1,4 +1,4 @@
#! /bin/sh
set -e
nix-env -p /nix/var/nix/profiles/system -f system-configuration.nix -i -A systemConfiguration
nix-env -p /nix/var/nix/profiles/system -f configuration/system-configuration.nix -i -A systemConfiguration
/nix/var/nix/profiles/system/bin/switch-to-configuration

View File

@ -0,0 +1,13 @@
{nix}:
{
name = "nix-daemon";
job = "
start on startup
stop on shutdown
set NIX_CONF_DIR=/nix/etc/nix
respawn ${nix}/bin/nix-worker --daemon > /dev/null 2>&1
";
}