Move Nix Store to new partition: Difference between revisions

imported>Buecking
No edit summary
imported>Buecking
No edit summary
Line 1: Line 1:
The tutorial will teach you how to relocate `/nix` to a new
The tutorial will teach you how to relocate `/nix` to a new
device.
device on non `NixOS` Hosts. A summery of how this could be done on nixOS is below
'''This has not been tested on NixOS'''  but there may still be a way:
 
 
 
= On *BSD/Linux Host =


The device that /nix is on has no more space
The device that /nix is on has no more space
Line 41: Line 46:
     $ sudo systemctl start nix-daemon.service
     $ sudo systemctl start nix-daemon.service


= NixOS =
Add [https://github.com/cleverca22/nixos-configs/blob/master/rescue_boot.nix rescue-boot.nix] to your imports section.
nixos-rebuild (and pray you have ~300mb free on /boot/)
run the installer from grub at any time.
adjust your configuration.nix so it expects /nix to be at the new place, and nixos-rebuild boot, so it doesnt break  after you move it
Now reboot and move it.


[[Category:Tutorial]]
[[Category:Tutorial]]
[[Category:NixOS]]
[[Category:NixOS]]