deploy-rs icon indicating copy to clipboard operation
deploy-rs copied to clipboard

Add a flag for building configuration with nix-output-monitor

Open stuebinm opened this issue 1 year ago • 3 comments

I like using the nix-output-monitor for my builds sometimes, so I added a --nom flag to deploy to make it call nom instead of nix when building the system configuration.

This is a pretty bare-bones change (e.g. it does not check if nom is actually present on the $PATH, though this could be added), and I'm not sure if you're interested in such a feature for deploy-rs in the first place — but I thought I'd leave this PR here in case it's useful to you.

stuebinm avatar Oct 01 '23 19:10 stuebinm

I like to run just deploy personally, I think others may feel the same - maybe it would make sense to have this configurable from the flake too?

Not sure if others would agree with merging this in, as I guess it could seem like feature creep. I've never seen nix-output-monitor before, but it looks neat, and I'd like to, so personally I wouldn't mind a way to use it. Are there any easy alternatives to adding integration of it, such as wrapping deploy with something that replaces the nix binaries with nom binaries?

notgne2 avatar Oct 01 '23 23:10 notgne2

I agree that

Are there any easy alternatives to adding integration of it, such as wrapping deploy with something that replaces the nix binaries with nom binaries?

Would be easier and less error-prone

rvem avatar Oct 02 '23 09:10 rvem

such as wrapping deploy with something that replaces the nix binaries with nom binaries?

I considered that when implementing it, but it seems hard — deploy does a lot of calls to nix, and not all make sense to pipe through nom in my opinion (e.g. it instantiates the flake to get information about the target first, where nix-output-manager would just clutter the terminal, it uses nix eval to check if the nix present supports flakes but nom eval doesn't even exist, …), so I'm not sure if there's a way to do this without having deploy be aware of it — at least I couldn't think of any.

maybe it would make sense to have this configurable from the flake too?

Oh that could be nice, yeah; I didn't think of that (I already always run deploy -ks out of habit, so the extra flag didn't bother me much).

Maybe I should've opened a more general discussion issue first :see_no_evil:

stuebinm avatar Oct 02 '23 10:10 stuebinm