nh icon indicating copy to clipboard operation
nh copied to clipboard

The argument `-u` / `--update` should ask for `sudo` if the flake isn't user writable

Open Lokito23 opened this issue 5 months ago • 3 comments

Currently, the -u argument on the nh os switch and nh os boot options fails to account a flake that isn't user writable, so it attempts to update the inputs, only to fail to write the update due to flake.lock not being writable by the user running the command.

It should check if the flake is writable, and if it isn't, it should ask for sudo to be able to update the flake.

Lokito23 avatar Jun 21 '25 16:06 Lokito23

I think this is best addressed after #92.

NotAShelf avatar Aug 16 '25 19:08 NotAShelf

I think this is best addressed after #92.

True, adding support for other priviledge escalation programs is important. After that, the implementation to fix this issue could be discussed.

Lokito23 avatar Aug 16 '25 23:08 Lokito23

This also applies when a new dependency flake is added.

athyfr avatar Oct 21 '25 01:10 athyfr