by drunner · 1y ago · 0 comments
The great part about that setup is my configuration contains not just my dotfiles, but also the installation of the programs themselves.
I don't use the "nix" way of configuration though, I instead have home manager symlink everthing for me. Then I can bail on nix anytime and not have to translate all my files back to yaml.
Glad programs like the above exist though for those who don't want to sink time into nix but want to reasonably track configuration.
One thing that helped me tremendously migrating the configuration bits was to leave "scratchpads" that I could tweak quickly without a full rebuild cycle:
programs.kitty.extraConfig = ''
include ${config.xdg.configHome}/kitty/temporary.conf
'';
Then my ~/.config/kitty looks like this: ~/.config/kitty $> ls
87 Dec 13 11:39 kitty.conf -> /nix/store/....-home-manager-files/.config/kitty/kitty.conf
381 Dec 13 11:42 temporary.confIMO it’s a good fit to use them together. YADM lets me do things like easily setting per-host configurations, encrypting secret files, etc.
My new host setup is to use YADM to pull my dot files, then install nix and run home-manager to install everything else. YADM even supports bootstrapping to automate that for me
https://github.com/Lillecarl/nixos/blob/master/users/lilleca... https://github.com/Lillecarl/nixos/blob/master/scripts/uglin...
There's something called mkOutOfStoreSymlink that does this natively, but it makes a symlinks from $HOME -> store -> git repo which annoyed me a bit.
For me getting my home environment up and running is just "FLAKE=$PWD nix run nixpkgs#home-manager -- --flake $FLAKE - - impure"
It's nice to not use "Real home manager" for some kinds of configurations since Nix is pretty slow.
Copied one dir over, ran guix home reconfigure and after everything installed, the environment was... Almost the same. I just need to write an integration that installs flatpaks since some apps are only available there.