Zed uses JSON5 for settings files. JQ doesn't understand that format and
fails if found, when merging with preexisting settings.
Here I add a conversion step that converts JSON5 to JSON before handling
the contents to JQ.
Besides, I changed the arguments in the jq function, so instead of using
`[0]` and `[1]`, we now use `$dynamic` and `$static` respectively. This
should make scripts more readable.
Fixes https://github.com/nix-community/home-manager/issues/7247
Fixes https://github.com/nix-community/home-manager/issues/7226
Reduce maintenance burden and increase efficiency by automatically
importing modules following a specific convention.
Co-authored-by: awwpotato <awwpotato@voidq.com>
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
Fix so that you can still generate `programs.helix.extraConfig` without
using `programs.helix.settings`. Useful particularly in the case of
`extraConfig = lib.readFile ./config.toml;`.
As I noticed in
<https://github.com/nix-community/home-manager/pull/7277#issuecomment-2985781610>,
it seems hyprland changed its domain name from `hyprland.org` to
`hypr.land`. (The old domain redirects to the new one)
These changes are made by the following:
find . \( -type d -name .git -prune \) -o -type f -print0 | xargs -0 sed -i 's/hyprland\.org/hypr.land/g'
Since we're creating a new derivation, we drop the original package
attributes. Add our own meta.mainProgram to resolve those warnings.
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
these hardcoded freeformat settings dont add anything over the default,
worse they generate empty sections which can then clash with user included config (my usecase).
It's best to move those to example.
so one can mix nix generated and manual configs
Instead of using `readFile` on the generated file, we included the generated config to avoid IFD. Because this approach makes ~/.config/meli/config.toml less readable (it referecens another generated file) I disabled it when the user does not "include" personal config. This feels a bit hackish but this is the best way I could find to keep the best of both worlds.
Fix an issue where the generated ~/.config/nvim/init.lua lacks a newline after the vim.cmd [[source ...]] directive. Without this newline, subsequent lua configuration is concatenated onto the same line, breaking lua syntax.
init.lua Before:
vim.cmd [[source /nix/store/...]]vim.opt.rtp:prepend(...)
After:
vim.cmd [[source /nix/store/...]]
vim.opt.rtp:prepend(...)
as per cha-config, keybindings should be under section `page` and not `pager`.
Also replaced the line with an example from man page because the current one wasn't working properly
Autocompletion scripts and additional plugin functions are located in
specific directories that might not match the plugin source script but
need to be included in fpath before calling compinit.
An option to provide a path to these scripts is added to add the paths
to fpath before calling completionInit.
Co-authored-by: @zimeg <zim@o526.net>
aichat is an all in one CLI tool for AI interactions.
On first run it prompts you to create a config so I made a home manager module to do this declaratively.