I recently had some issues that I decided to solve by just reinstalling nixos on my “/“ partition and I now need to remount the old swap, /home, and, /nix partitions. I see a few ways to this but I am flat out confused. For each partition can I run
$ mount /dev/nvme0n1p4/home/mount-home/
$ mount /dev/nvme0n1p4/nix/mount-nix/
(I currently am lost on how to mount the swap drive)
then simply rebuild switch? Or would I rebuild boot?
How did you mount those partitions in the first place? If you are trying to recreate an existing mount scheme, check the settings in config.fileSystems
in the NixOS configuration which is typically defined in /etc/nixos/hardware-configuration.nix
. Those settings show what Nix is expecting of the filesystems on the machine.
Originally I had mounted everything with the GUI installer. I still have that version’s hardware-configuration.nix file located on the /home partition but for whatever reason I can’t use thunar to access the partition to reference that file. I will check the config.filesystem as soon as I can.
Due to time constraints and some possible issues I ended up temporarily mounting the drive, backing it up and then re-installing and re-partitioning. The main issue I think came from when I originally re-installed nixos I created a new desktop environment which then made a home directory. This caused an issue with mounting the old home directory from what I understand.