How to use topgrade with home-manager?

Hi,

As many others, I keep a choice of applications defined via Nix and available across all computers I use. When Bluefin updates, it checks for a file at ~/.config/home-manager/home.nix for updating any present Nix configuration.

Without being any expert at Nix, I’ve been trying to create a home.nix file that can be used by topgrade.

So far, I could not find the right way to “just” use the configuration I have defined in my remote GitHub repo (or local copy, after I clone it).

Do other home-manager users of Bluefin have some tips about how to update the packages of my Nix configuration with topgrade?

Alias maybe?
I use some AUR packages in my arch container and topgrade wont update those so I alias:

alias upd='paru && ujust update'

I’m not sure if I understand you, how would I use the alias to reuse my Nix configuration?

I have the same question, would love to peek at a working github repo

A possible solution that works for me and it is quite simple:

  1. Clone your Nix configuration locally
  2. Link ~/.config/home-manager to your configuration folder (the whole folder)

In other words, put all your Nix and Home manager stuff in ~/.config/home-manager and then topgrade will update it every time it runs.

You can always test it with topgrade --only home_manager

There is still something I need to figure out:

In Bluefin, my home path is different to my other machines. How could I handle that automatically?