nix-darwin icon indicating copy to clipboard operation
nix-darwin copied to clipboard

Replace etc files with links if they exist but backup first

Open domenkozar opened this issue 6 years ago • 8 comments

Fixes #149

domenkozar avatar Jun 27 '19 14:06 domenkozar

I added some extra validation for nix.conf in 4bffc92, this should be relatively safe if the uninstaller restores the backup files.

LnL7 avatar Jul 01 '19 20:07 LnL7

Thanks :)

domenkozar avatar Jul 02 '19 07:07 domenkozar

@LnL7 Is this alright to merge? The installer in its current state leaves you without darwin-rebuild available in the path if you install nix-darwin immediately after installing nix because it can't replace things in /etc/ unless the user moves them first.

kclejeune avatar Jun 11 '20 23:06 kclejeune

I've used this in production quite a few times and it works.

domenkozar avatar Jun 12 '20 08:06 domenkozar

I've used this in production quite a few times and it works.

It looks good to me, this is pretty much the same process I did manually to get the install to work. Does this also have the update to restore backed up files using the uninstaller?

kclejeune avatar Jun 12 '20 16:06 kclejeune

I run into this with /etc/shells quite a bit, would this still be a candidate for merger?

kradalby avatar Apr 20 '22 07:04 kradalby

I run into this with /etc/shells quite a bit, would this still be a candidate for merger?

This doesn't work in its current state anymore, but my work in #257 does.

When I originally opened it, @LnL7 requested finer controls over which files are backed up, but I didn't have time to fix that at the time. I can revisit it to fix that and open the PR again.

kclejeune avatar Apr 20 '22 12:04 kclejeune

@kclejeune that would be great 👍

kradalby avatar Apr 24 '22 06:04 kradalby