I just discovered your project, it looks very nice. I immediately wanted the full JSON-powered experience when calling home-manager switch, so I took a stab at implementing that.
Once I had that done, I nerd-sniped myself into trying to get it to work for nixos-rebuild, too. I could get this to work when using the --fast or --no-build-nix flags. Without those flags, nixos-rebuild builds/fetches a new version of nix and uses that instead.
I then created wrappers for the various nix commands, too. There's probably some edge cases in this code, but it's a starting point:
Personally, I only use the aliases, since if something isn't working due to the way I've wrapped it, I can just use command to use the un-wrapped version, e.g. command home-manager switch.
It works quite well so far. home-manager always triggers nix-output-monitor error: DerivationParseError "string" but other than that it's flawless.
I just discovered your project, it looks very nice. I immediately wanted the full JSON-powered experience when calling
home-manager switch
, so I took a stab at implementing that.Once I had that done, I nerd-sniped myself into trying to get it to work for
nixos-rebuild
, too. I could get this to work when using the--fast
or--no-build-nix
flags. Without those flags,nixos-rebuild
builds/fetches a new version of nix and uses that instead.I then created wrappers for the various nix commands, too. There's probably some edge cases in this code, but it's a starting point:
Personally, I only use the aliases, since if something isn't working due to the way I've wrapped it, I can just use
command
to use the un-wrapped version, e.g.command home-manager switch
.It works quite well so far.
home-manager
always triggersnix-output-monitor error: DerivationParseError "string"
but other than that it's flawless.home-manager switch
:nixos-rebuild build --fast
: