mobile-nixos
mobile-nixos copied to clipboard
How to install on SD card?
I guess everything is in the title. The Pinephone internal eMMC doesn't have much disk space so I wonder how to install on SD card
I tried to follow https://wiki.nixos.org/wiki/Storage_optimization#Moving_the_store which solve the issue for the nix store but doesn't solve the space problem when compiling. I run out of space so I can't update from 23.11 to 24.05.
Here are the two picture showing the issue :
I moved /nix to th SD card (/dev/mmcblk0p1)
and I deleted /nix in emmc to let the place for nixos-rebuild switch but I can't build because of lack of space at building time :
/tmp is stored in memory, no ? maybe you need more swap ?
yes /tmp should be solvable with a swap file. They can create the swap file on the sd card and it should help though it could slow down the upgrade process but slower upgrades is better than unable to upgrade.
I added a swap file and it has helped to build but unfortunately, after reboot, /nix is still not on the sdcard, it keeps being mounted on mmc storage even though I added to /etc/nixos/hardware-configuration.nix, as explain in https://wiki.nixos.org/wiki/Storage_optimization#Moving_the_store,
fileSystems."/nix" = {
device = "/dev/mmcblk0p1";
fsType = "f2fs";
neededForBoot = true;
options = [ "noatime" ];
};
so it means I have to to all the mount, rsync, umount, mount story everytime I want to build...
I don't understand, after a second build and reboot, it now works as expected, /nix is mounted on sd card, on /dev/mmcblk0p1 .