Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

stuebinm
Copy link

@stuebinm stuebinm commented Oct 1, 2023

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.

all this does is to replace the build invocations of nix/nix-build
with nom/nom-build (of https://github.com/maralorn/nix-output-monitor)
which gives more structured output of the running build.
@notgne2
Copy link
Contributor

notgne2 commented Oct 1, 2023

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?

@rvem
Copy link
Member

rvem commented Oct 2, 2023

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

@stuebinm
Copy link
Author

stuebinm commented Oct 2, 2023

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 🙈

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants