* Start the Nix daemon to enable multi-user package management in
NixOS. svn path=/nixos/trunk/; revision=7291
This commit is contained in:
parent
f049c35a86
commit
2fe4badb9a
@ -105,6 +105,10 @@ udevtrigger
|
|||||||
udevsettle # wait for udev to finish
|
udevsettle # wait for udev to finish
|
||||||
|
|
||||||
|
|
||||||
|
# !!! Hack - should be done with udev rules.
|
||||||
|
chmod 666 /dev/null
|
||||||
|
|
||||||
|
|
||||||
# Enable a password-less root login.
|
# Enable a password-less root login.
|
||||||
source @accounts@
|
source @accounts@
|
||||||
|
|
||||||
@ -164,7 +168,7 @@ cat > /etc/profile <<EOF
|
|||||||
export PATH=$PATH
|
export PATH=$PATH
|
||||||
export MODULE_DIR=$MODULE_DIR
|
export MODULE_DIR=$MODULE_DIR
|
||||||
export NIX_CONF_DIR=/nix/etc/nix
|
export NIX_CONF_DIR=/nix/etc/nix
|
||||||
if test "\$HOME" != root; then
|
if test "\$USER" != root; then
|
||||||
export NIX_REMOTE=daemon
|
export NIX_REMOTE=daemon
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -135,6 +135,11 @@ rec {
|
|||||||
inherit (pkgs) openssh;
|
inherit (pkgs) openssh;
|
||||||
})
|
})
|
||||||
|
|
||||||
|
# Nix daemon - required for multi-user Nix.
|
||||||
|
(import ../upstart-jobs/nix-daemon.nix {
|
||||||
|
inherit nix;
|
||||||
|
})
|
||||||
|
|
||||||
# X server.
|
# X server.
|
||||||
(import ../upstart-jobs/xserver.nix {
|
(import ../upstart-jobs/xserver.nix {
|
||||||
inherit (pkgs) genericSubstituter;
|
inherit (pkgs) genericSubstituter;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
set -e
|
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
|
/nix/var/nix/profiles/system/bin/switch-to-configuration
|
||||||
|
13
upstart-jobs/nix-daemon.nix
Normal file
13
upstart-jobs/nix-daemon.nix
Normal 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
|
||||||
|
";
|
||||||
|
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user