0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-14 06:00:33 +03:00

find modules | fgrep .nix | fgrep -v .svn | fgrep -v nixpkgs.nix | xargs sed -i -e 's|/nix/var|${config.nixpkgs.config.nix.stateDir}|g' -e 's|/nix/store|${config.nixpkgs.config.nix.storeDir}|g'

Don't assume /nix/store or /nix/var in NixOS modules, this is configurable

svn path=/nixos/trunk/; revision=30104
This commit is contained in:
Shea Levy 2011-10-29 21:03:57 +00:00
parent 9d496c77ac
commit 09cf6ce70c
21 changed files with 57 additions and 57 deletions

View file

@ -222,7 +222,7 @@ let
# Install GRUB and generate the GRUB boot menu.
touch /etc/NIXOS
mkdir -p /nix/var/nix/profiles
mkdir -p ${config.nixpkgs.config.nix.stateDir}/nix/profiles
${config.system.build.toplevel}/bin/switch-to-configuration boot
umount /boot
@ -276,11 +276,11 @@ in
chmod 1777 $targetRoot/tmp
mkdir -p $targetRoot/boot
mount -o remount,ro $targetRoot/nix/store
mount -o remount,ro $targetRoot${config.nixpkgs.config.nix.storeDir}
${optionalString cfg.writableStore ''
mkdir /mnt-store-tmpfs
mount -t tmpfs -o "mode=755" none /mnt-store-tmpfs
mount -t aufs -o dirs=/mnt-store-tmpfs=rw:$targetRoot/nix/store=rr none $targetRoot/nix/store
mount -t aufs -o dirs=/mnt-store-tmpfs=rw:$targetRoot${config.nixpkgs.config.nix.storeDir}=rr none $targetRoot${config.nixpkgs.config.nix.storeDir}
''}
'';
@ -314,7 +314,7 @@ in
[ { mountPoint = "/";
device = "/dev/vda";
}
{ mountPoint = "/nix/store";
{ mountPoint = "${config.nixpkgs.config.nix.storeDir}";
device = "//10.0.2.4/store";
fsType = "cifs";
options = "guest,sec=none,noperm,noacl";