{
  config,
  lib,
  ...
}: {
  imports = [
    ../../../../../agenix/age/identityPaths
    ../../../../../home-manager/nixpkgs/config/allowUnfree
  ];

  options.dotfiles.inputs.nixvim.programs.nixvim.plugins.codeium-nvim.enable =
    lib.dotfiles.mkEnableOption;

  config =
    lib.mkIf
    config.dotfiles.inputs.nixvim.programs.nixvim.plugins.codeium-nvim.enable
    {
      dotfiles.inputs = {
        agenix.age.identityPaths.enable = true;
        home-manager.nixpkgs.config.allowUnfree.enable = true;
      };

      age.secrets.modulesProgramsNixvimPluginsCodeiumApiKey = {
        file = ../codeium_api_key.age;
      };

      programs.nixvim.plugins.codeium-nvim = {
        configPath.__raw = ''
          vim.fn.expand(
            "${config.age.secrets.modulesProgramsNixvimPluginsCodeiumApiKey.path}"
          )
        '';

        enable = true;
      };
    };
}
