Skip to content

Can I customize the root partition disk size? Or mount a data volume at /nix? #419

Answered by jandubois
ghost asked this question in Q&A
Discussion options

You must be logged in to vote

This is specific to Alpine (because we use an ISO and not a regular image):

The "diffdisk" in this case is indeed a separate data volume, and the following directories have been moved to the persisted disk: /etc, /home, /tmp, /usr/local, and /var/lib.

You will notice that changes to any other part of the filesystem will be reverted by an instance restart because the OS runs from a tmpfs.

However, it should be easy enough to move your /nix directory to the persistent volume too:

# mv /nix /mnt/data
# mkdir /nix
# mount --bind /mnt/data/nix /nix

You will also want to create a system provisioning script in your lima.yaml to repeat the mount command on each boot.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested guest/alpine Guest: Alpine
1 participant