mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-30 01:23:03 +00:00
* 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
|
||||
|
||||
|
||||
# !!! 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
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
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…
Reference in New Issue
Block a user