mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 21:50:55 +00:00
Put /nix/var/nix/{temproots,userpool} on a tmpfs
This commit is contained in:
parent
c13cede19d
commit
dd49094a25
|
@ -336,13 +336,13 @@ in
|
|||
# Nix initialisation.
|
||||
mkdir -m 0755 -p \
|
||||
/nix/var/nix/gcroots \
|
||||
/nix/var/nix/temproots \
|
||||
/nix/var/nix/manifests \
|
||||
/nix/var/nix/userpool \
|
||||
/nix/var/nix/profiles \
|
||||
/nix/var/nix/db \
|
||||
/nix/var/log/nix/drvs \
|
||||
/nix/var/nix/channel-cache
|
||||
/nix/var/nix/channel-cache \
|
||||
/run/nix/temproots \
|
||||
/run/nix/userpool
|
||||
mkdir -m 1777 -p \
|
||||
/nix/var/nix/gcroots/per-user \
|
||||
/nix/var/nix/profiles/per-user \
|
||||
|
@ -350,6 +350,9 @@ in
|
|||
|
||||
ln -sf /nix/var/nix/profiles /nix/var/nix/gcroots/
|
||||
ln -sf /nix/var/nix/manifests /nix/var/nix/gcroots/
|
||||
|
||||
[ -d /nix/var/nix/temproots ] || ln -sfn /run/nix/temproots /nix/var/nix/temproots
|
||||
[ -d /nix/var/nix/userpool ] || ln -sfn /run/nix/userpool /nix/var/nix/userpool
|
||||
'';
|
||||
|
||||
};
|
||||
|
|
|
@ -106,7 +106,7 @@ fi
|
|||
|
||||
|
||||
# Also get rid of temporary GC roots.
|
||||
rm -rf /nix/var/nix/gcroots/tmp /nix/var/nix/temproots
|
||||
rm -rf /nix/var/nix/gcroots/tmp /nix/var/nix/temproots /nix/var/nix/userpool
|
||||
|
||||
|
||||
# Create a tmpfs on /run to hold runtime state for programs such as
|
||||
|
|
Loading…
Reference in a new issue