1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-09-11 15:08:33 +01:00

* Multi-user Nix setup has changed.

svn path=/nixos/trunk/; revision=7285
This commit is contained in:
Eelco Dolstra 2006-12-09 00:06:18 +00:00
parent bc3f4f8352
commit f20d572814
3 changed files with 14 additions and 9 deletions

View file

@ -131,21 +131,26 @@ echo "hosts: files dns" > /etc/nsswitch.conf
if test -z "@readOnlyRoot@"; then
for i in $(seq 1 10); do
account=nix-build-$i
account=nixbld$i
if ! userExists $account; then
createUser $account x \
$((i + 30000)) $((i + 30000)) \
$((i + 30000)) 30000 \
'Nix build user' /var/empty /noshell
fi
accounts="$accounts $account"
accounts="$accounts${accounts:+,}$account"
done
if ! grep -q "^nixbld:" /etc/group; then
echo "nixbld:*:30000:$accounts" >> /etc/group
fi
mkdir -p /nix/etc/nix
cat > /nix/etc/nix/nix.conf <<EOF
build-allow-root = false
build-users = $accounts
build-users-group = nixbld
EOF
chown root.nixbld /nix/store
chmod 1775 /nix/store
fi

View file

@ -1,5 +1,5 @@
{ genericSubstituter, buildEnv, shell, coreutils, findutils
, utillinux, kernel, udev, upstart, setuidWrapper
, gnugrep, utillinux, kernel, udev, upstart, setuidWrapper
, path ? []
, # Whether the root device is root only. If so, we'll mount a
@ -17,6 +17,7 @@ let
startPath = [
coreutils
findutils
gnugrep
utillinux
udev
upstart

View file

@ -195,7 +195,7 @@ rec {
# everything else to bring up the system.
bootStage2 = import ../boot/boot-stage-2.nix {
inherit (pkgs) genericSubstituter buildEnv coreutils findutils
utillinux kernel udev upstart;
gnugrep utillinux kernel udev upstart;
inherit setuidWrapper;
inherit upstartJobs;
shell = pkgs.bash + "/bin/sh";
@ -207,7 +207,6 @@ rec {
pkgs.cpio
pkgs.curl
pkgs.e2fsprogs
pkgs.gnugrep
pkgs.gnused
pkgs.gnutar
pkgs.grub
@ -243,7 +242,7 @@ rec {
# The user configuration.
config = {
networking = {
hostname = "vindaloo";
hostname = "nixos";
};
};