But i get this error every time i wanna rebuild switch:
Running phase: unpackPhase
unpacking source archive /nix/store/650fj7hrjyd2g26h10iln4467a9547yy-catppuccin_mocha.omp.json
do not know how to unpack source archive /nix/store/650fj7hrjyd2g26h10iln4467a9547yy-catppuccin_mocha.omp.json
So how ca i download it and put it in the .config/oh-my-posh?
Ah, hum, also, don’t do that, your home-manager will silently update every 2 hours or so with this config. Add it to your channels instead, follow the docs: Home Manager Manual
I have never used oh-my-posh, but it looks like Home Manager has an option you could use instead of downloading the theme. So you could probably just set something like this:
Also, for future reference, the error you were getting was because nixstdenv.mkDerivation was expecting src to be some kind of archive file (e.g. .zip, .tar.gz, etc.) rather than a text file.
Edit: Correction, it was stdenv.mkDerivation that was expecting an archive, not nix itself, as pointed out below by @TLATER.
Specifically, stdenv.mkDerivation expects the input source to be an archive by default, and will try to extract it as part of the build. nix itself doesn’t really care, it’s the default build script in nixpkgs that’s throwing this error.
You could also set dontUnpack = true to skip the unpack phase if you wanted to do this, but there’s no reason to add another derivation on top if all you want to do is download a single file.