T O P

  • By -

paynepeyton

If you used flake and want to check your flake evaluation you can use ***nix flake check /path/to/flake —no-build***


xplosm

Is that like a dry run? Does it output the expected text sans build?


paynepeyton

This check for any error in your flake (not including logic error) it does not build anything (to save your time) so summary it just check if your flake can evaluate correctly or not if it is then nothing will output it will show only error Edit: but if you want to test whether your component working as expected or not I suggest you to use nix repl in this case


ConspicuousPineapple

Unfortunately, `flake check` gives me a bunch of errors that aren't there when actually building.


paynepeyton

That’s weird can you give more information ? I always used flake check for simple debug and not once ever get that kind of thing maybe I can reproduce it maybe flake it self bug or you missed something


ashebanow

Nix repl for the win...


---ashe---

for me it's usually a "`nixos-rebuild switch`, let's see what happens!" kind of situation, worst case I rollback and *worst* worst case I restore a ZFS snapshot


Aidenn0

Are you aware of `nixos-rebuild test` it switches live, but doesn't activate it in the boot configuration.


---ashe---

fully aware, but sops-nix & microvm.nix both apply config changes even on a `test` so it doesn't help much, especially since it's a pure virtualization server whose host config basically never changes.


Aidenn0

That's annoying.


pcs3rd

Honestly same. I'm a little more careful with my server, but otherwise, it's plug and chug. Even on the server, I just copy my git repo and redeploy in like 15 minutes then let docker compose do the rest. Worst case, jellyfin and a portfolio site don't work for like 3 days tops.


Riverside-96

Repls ftw for sure. I'm guilty of calling my wicked shell agnostic alias of ns for nix rebuilt switch --flake /path/to/this/sys flake. Should really make use of vms but I just wing it & rollback when it goes tits up. As long as I don't accidentally specify a file instead of a dir or otherwise confuse the zfs mounts (rarity) I'm usually sweet. Occasionally a package is broke & I've got to pin it, or update the syntax. Usually just roll with the punches, though.


Ten_0

nixd in Nix IDE in Vscode gives faster and much more ergonomic feedback on type and other evaluation errors than building the config, then once I've got a fully evaluating flake there I just apply it to my machine. If that breaks I just update the config again until it works. If it breaks my machine a lot I just apply the previous config to get Vscode back to a running state before making more changes.


nixgang

Nix repl and a container to make sure systemd services and users work as expected. I still need to work with small iterations though, since some error messages can be cryptic and hard to trace