Is it possible for configuration changes to reflect in nixCats without rebuilding? #28
-
I initially thought it was possible for me to just tell nixCats the config dir in my config repo and it will create a wrapped nvim that will load lua code from the specified directory instead of the standard In summary, is it possible to have live loading of lua code without having to rebuild nixcats if there is no nix change? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 23 replies
-
Line 339 in cd8e419 :h nixCats.flake.outputs.settings ^ documentation Yes, with wrapRc option. Obviously if you change any nix code you will still have to rebuild. The quick tip in the help I linked is how I use the option. Basically, I just launch the version with Its really good for messing around with lua but because it doesnt copy it to the store it obviously wont be included if you do This has the added benefit that |
Beta Was this translation helpful? Give feedback.
-
An aside because I think you also mentioned another thing If your Lua config is in a separate repo you can still put it in there you just have to import the repo. Just put it in flake inputs and put the input in the LuaPath variable. You could even do sub paths of said other repo with However this wouldn't solve the live update thing, because that particular version of said other repo is now in the store, so you would still need to use the wrapRc option or rebuild. LuaPath option can only accept store paths, this is a hard limit of derivations. Derivations are built in a sandbox that doesn't have access to the rest of the filesystem (or the internet, although you can supposedly do some magic with fixed output derivations to get internet, you just have to specify the resulting hash of the final output of the derivation, and it will fail if it doesn't match. Pretty sure this is how they do some of the npm stuff. Normally the hash is of the derivation instructions but for fixed output ones, the hash is of the result.) |
Beta Was this translation helpful? Give feedback.
nixCats-nvim/flake.nix
Line 339 in cd8e419
:h nixCats.flake.outputs.settings
^ documentation
Yes, with wrapRc option. Obviously if you change any nix code you will still have to rebuild.
The quick tip in the help I linked is how I use the option. Basically, I just launch the version with
wrapRc = false
when im messing around with lua, and then rebuild when im done and go back to using the one withwrapRc = true
so that it imports properly on other machines again. (The option just skips copying the directory and then you symlink it yourself)Its really good for messing around with lua but because it doesnt copy it to the store it obviously wont be included…