-
Notifications
You must be signed in to change notification settings - Fork 24
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
Fails to read nixos-rebuild output correct #116
Comments
Update: seems to be related to unbuffer |
Can you please share the command you ran? |
unbuffer nixos-rebuild switch --flake .#Rory-nginx -j`nproc` --upgrade-all --log-format internal-json -v |& nom --json |
I am surprised that this is working at all. But I agree it’s weird that it works for some lines and doesn‘t for others. |
if this is marked as an enhancement, i wonder if we could get a |
The wish for a nom supported nixos-rebuild has been voiced before. And is definitely an open feature request. But I think it is more about changing nixos-rebuild than solving this in nom. The enhancement request that I see in this issue would be "make the --json parser cleanly pass-through non json lines and correctly detect all json lines." I consider this an enhancement and not a bug because the --json parser was never supposed to be used on non-json input. |
what i personally ended up doing was using
|
does anyone know if there are any downsides to @TheArcaneBrony's approach? seems pretty good to me, all things considered :) |
No, that’s basically what I do. |
You might find the nh cli helper particularly useful when it comes to using |
Looks like with this approach nix can't use ssh builders/extra substituters. |
@kurnevsky That seems highly unlikely. |
Well, it can use them if nom is launched as root, but not as plain user. Found this relevant nh issue: viperML/nh#70 (the command I'm running is |
They work fine for me, maybe there's something more to it? have you confirmed they work with the base I'd assume that, if it works with root, it's due to your normal user not being a trusted user. |
also, just fyi: instead of My full build command is (with added comparison to running system and split across lines): nom build ~/dev/dotnix#nixosConfigurations.$(hostname).config.system.build.toplevel --out-link /tmp/nixos-configuration && \
nvd diff /run/current-system /tmp/nixos-configuration && \
sudo /tmp/nixos-configuration/bin/switch-to-configuration switch |
Well, nixos-rebuild also sets the generation via nix-env. |
I use
I haven't, since I don't usually have stable address for them, so I prefer to specify them dynamically. |
Also nixos-rebuild executes switch-to-configuration using systemd-run to mitigate NixOS/nixpkgs#39118 |
Output is spammed with
![Screenshot from 2023-09-26 14-17-05](https://private-user-images.githubusercontent.com/13570458/270652169-28251e64-e759-4871-b6e4-d6526f8197b9.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE5MzExMDksIm5iZiI6MTcyMTkzMDgwOSwicGF0aCI6Ii8xMzU3MDQ1OC8yNzA2NTIxNjktMjgyNTFlNjQtZTc1OS00ODcxLWI2ZTQtZDY1MjZmODE5N2I5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MjUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzI1VDE4MDY0OVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTMwYjkwZDY2Y2E5Njg3NTgxNzM4YjA4MWFjZjg1NzVjMmYzMGZlNjc1OGRkMzNmNGY1Zjc1NDE5YWM5ZDk1OGMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0._TnedRfv6UYEmoIJu9cUT4f3jbkCQiX4t0ylxyX0rTY)
@nix {"action":"start"...
and seems to miss a lot of steps.The text was updated successfully, but these errors were encountered: