<disasm>
yeah, disk is primarily the difficult one :) followed by network interface name
<disasm>
although I just realized this is #nix-darwin. Should we move this elsewhere aminechikhaoui gchristensen? I'd love to get feedback on the best way to go about having a nixops plugin for packet :)
cransom has quit [Quit: WeeChat 2.3]
veske has joined #nix-darwin
<domenkozar[m]>
LnL: sorry if we discussed linking warnings, can you remind me what was the conclusion?
<domenkozar[m]>
I think the intention behind current design was not to lose data
<domenkozar[m]>
but in general I'd say nix-darwin should configure the system as intended via configuration.nix
<domenkozar[m]>
so what if all existing files were backed up and then replaced?
<LnL>
yeah, as well as the fact that there are system managed files which might be dangerous
<domenkozar[m]>
but those shouldn't be managed by nix-darwin right?
<LnL>
you could with the module
<domenkozar[m]>
so given that nix-darwin can run with sudo there's many things one can do and screw up the system, but there's a line between what's in upstream modules and what they can damange vs what user space modules do
<domenkozar[m]>
damage*
<domenkozar[m]>
so preserving data is absolute must, but there should also be a way for nix-darwin to be able to take over these files
<LnL>
I'd prefer not to silently replace unexpected things and add an unsafe* option to skip checks and force operations like this
<domenkozar[m]>
what if nix-darwin would say something like
<LnL>
as well as perhaps some global deploy flag for automated cases that enables all this
<domenkozar[m]>
backing up /etc/nix/nix.conf to /etc/nix/.nix-darwin.bkp.nix.conf and replacing original file
<domenkozar[m]>
and then on subsequent run
<LnL>
that's also an option
<domenkozar[m]>
review /etc/nix/.nix-darwin.bkp.nix.conf and move it to a safe location if it's not needed anymore
<domenkozar[m]>
or something along those lines
<domenkozar[m]>
the latter would add some FS ovehead
<domenkozar[m]>
I'm not a huge fan of flags, since they create branched code. Do you think someone might want the old behaviour? i.e. did you have situations where backup those files wouldn't suffice?
<domenkozar[m]>
so after running nix-darwin you end up in the same situation as before, except that the new files are in place, one can still revert manually instead of manually enforcing the system
<LnL>
I guess it's fine, main problem wit that is that it could be hard to notice since it only warns once
<LnL>
hmm, what if it also shows the message if the backup file exists?
<domenkozar[m]>
yeah that's what I thought with
<domenkozar[m]>
> backing up /etc/nix/nix.conf to /etc/nix/.nix-darwin.bkp.nix.conf and replacing original file
<{^_^}>
undefined variable 'backing' at (string):255:1
<domenkozar[m]>
errr, sorry:
<domenkozar[m]>
> review /etc/nix/.nix-darwin.bkp.nix.conf and move it to a safe location if it's not needed anymore
<{^_^}>
error: syntax error, unexpected IF, expecting ')', at (string):255:73
<LnL>
yeah
<LnL>
it needs to be outside of /etc tho, /etc/nix is a store path
<LnL>
ah n/m I misremembered
<domenkozar[m]>
that's on nixos :)
<domenkozar[m]>
LnL: great I'll implement this after lunch :)
<LnL>
no I think nixos mirrors the directory structure in the same way
<domenkozar[m]>
right there's an indirection
<domenkozar[m]>
as /etc/static -> /nix/store/6407726c6b3dr3209h94jac0iy8c5sv9-etc/etc
<LnL>
yeah so you can mix links an mutable files one of which could be the backup
peacememories has joined #nix-darwin
{^_^} has quit [Remote host closed the connection]
{^_^} has joined #nix-darwin
peacememories has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]