Change persistence for update feature to function properly

This commit is contained in:
Tyler Kelley 2024-02-29 23:02:13 -06:00
parent 3349266d95
commit f9ca753421
3 changed files with 2 additions and 10 deletions

View File

@ -22,7 +22,8 @@ in
"Music" "Music"
"Documents" "Documents"
"Pictures" "Pictures"
"Videos" "Videos"
"zaneyos"
".local/share/sddm" ".local/share/sddm"
".mozilla" ".mozilla"
".cache" ".cache"

View File

@ -44,13 +44,6 @@
options = [ "bind" ]; options = [ "bind" ];
}; };
fileSystems."/home/${username}/zaneyos" =
{
device = "/nix/persist/etc/nixos/zaneyos";
fsType = "none";
options = [ "bind" ];
};
fileSystems."/var/log" = fileSystems."/var/log" =
{ {
device = "/nix/persist/var/log"; device = "/nix/persist/var/log";

View File

@ -28,13 +28,11 @@ if [ -d "zaneyos" ]; then
echo "ZaneyOS exists, backing up to .config/zaneyos-backups folder." echo "ZaneyOS exists, backing up to .config/zaneyos-backups folder."
if [ -d ".config/zaneyos-backups" ]; then if [ -d ".config/zaneyos-backups" ]; then
echo "Moving current version of ZaneyOS to backups folder." echo "Moving current version of ZaneyOS to backups folder."
sudo umount $HOME/zaneyos
sudo mv $HOME/zaneyos .config/zaneyos-backups/$backupname sudo mv $HOME/zaneyos .config/zaneyos-backups/$backupname
sleep 1 sleep 1
else else
echo "Creating the backups folder & moving ZaneyOS to it." echo "Creating the backups folder & moving ZaneyOS to it."
mkdir .config/zaneyos-backups mkdir .config/zaneyos-backups
sudo umount $HOME/zaneyos
sudo mv $HOME/zaneyos .config/zaneyos-backups/$backupname sudo mv $HOME/zaneyos .config/zaneyos-backups/$backupname
sleep 1 sleep 1
fi fi