Skip to content

Commit

Permalink
fix(modules/programs/nixvim/plugins/codeium-vim): directory unavailable
Browse files Browse the repository at this point in the history
Create the directory prior to symlinking to avoid the following error:

> ln: failed to create symbolic link
> '/home/naho/.local/share/.codeium/config.json': No such file or
> directory

Follows: c4ded96
  • Loading branch information
trueNAHO committed Feb 20, 2024
1 parent 2a145e5 commit 4327728
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions modules/programs/nixvim/plugins/codeium-vim/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,18 @@
# TODO: Replace the activation script with an upstream VIM plugin option for
# setting the config path storing the API key, similar to the 'config_path'
# option in https://github.com/Exafunction/codeium.nvim.
home.activation.codeiumVim = lib.hm.dag.entryAfter ["writeBoundary"] ''
ln \
--force \
--symbolic \
${config.age.secrets.modulesProgramsNixvimPluginsCodeium.path} \
"${config.xdg.dataHome}/.codeium/config.json"
'';
home.activation.codeiumVim = let
directory = "${config.xdg.dataHome}/.codeium";
in
lib.hm.dag.entryAfter ["writeBoundary"] ''
mkdir --parents "${directory}"
ln \
--force \
--symbolic \
${config.age.secrets.modulesProgramsNixvimPluginsCodeium.path} \
"${directory}/config.json"
'';

programs.nixvim.plugins.codeium-vim.enable = true;
}

0 comments on commit 4327728

Please sign in to comment.