Migrating from another Linux distro - preserve contents of home?

I am in the process of migrating my second PC from Manjaro to NixOS. This Manjaro PC has been around for a long time and has an enormous home user directory with configs and data. If during the installation process I partition my / on a seperate drive and mount /home/ to where my current Manjaro /home/ is, will the transfer of configs and data transition seamlessly to NixOS?

I did something similar before many years ago when I migrated from Ubuntu to Manjaro. I once read that a Linux user dual booted Gentoo and a variation of Suse where both operating systems shared a home directory. Pretty cool.

I realize that Home Manager is a special use case and is 100% incomptible with other Linux distros so to be clear for now I don’t plan on using Flakes or Home Manager - - just manage my packages with nixpkgs and configs the traditional way.

I have begun to use Gnu Stow to manage dotfiles and track on GitHub but I am wondering whether my current Manjaro /home/ can be dropped in to my new NixOS installation without manually handling each dotfile. How seamless can I expect that kind of transition to be? If there could be obstacles, what would they be and how would it be different compared to migrating other distros and home directories as I have successfully done so in the past?

So for me it worked just fine. After I reinstalled my system I just dropped my old home directory in my new one and it worked just fine.

Yes it should be that easy with nixos too.

As for the Home-Manager part, if you decide to use it you may encounter some issues with preexisting files. For that use this command journalctl -xe --unit home-manager-matt to see wich files you need to delete.

1 Like

which files you need to delete

I wouldn’t recommend a straight up delete. OP could simply move those into their home-manager-config and have home-manager populate those dotfiles, making small parts of them declarative using nix expressions like so: nix-config/home/programs/rofi at master · gvolpe/nix-config · GitHub

I realize that you know about this. But I just want to be clear for those that don’t know about the super convenient hm dotfile management options we have at our disposal.

1 Like

yeah thats also an option. But I meant like gtk-3.conf and this stuff wich you normally don’t have as Dotfiles.

1 Like