54 lines
1.3 KiB
Nix
54 lines
1.3 KiB
Nix
{ config, pkgs, lib, ... }:
|
|
|
|
let
|
|
cfg = config.dot.llm;
|
|
in
|
|
{
|
|
options.dot.llm = {
|
|
enable = lib.mkEnableOption "LLM tools";
|
|
claude-code.enable = lib.mkOption {
|
|
type = lib.types.bool;
|
|
default = false;
|
|
description = "Enable claude-code";
|
|
};
|
|
opencode.enable = lib.mkOption {
|
|
type = lib.types.bool;
|
|
default = false;
|
|
description = "Enable opencode";
|
|
};
|
|
gemini-cli.enable = lib.mkOption {
|
|
type = lib.types.bool;
|
|
default = false;
|
|
description = "Enable gemini-cli";
|
|
};
|
|
bubblewrap.enable = lib.mkOption {
|
|
type = lib.types.bool;
|
|
default = pkgs.stdenv.isLinux;
|
|
description = "Enable bubblewrap (Linux only)";
|
|
};
|
|
};
|
|
|
|
config = lib.mkMerge [
|
|
{
|
|
programs.direnv = {
|
|
enable = true;
|
|
enableZshIntegration = true;
|
|
nix-direnv.enable = true;
|
|
};
|
|
|
|
home.packages = with pkgs; [
|
|
visidata
|
|
codespelunker
|
|
];
|
|
}
|
|
|
|
(lib.mkIf cfg.enable {
|
|
home.packages =
|
|
(lib.optional cfg.claude-code.enable pkgs.unstable.claude-code) ++
|
|
(lib.optional cfg.opencode.enable pkgs.unstable.opencode) ++
|
|
(lib.optional cfg.gemini-cli.enable pkgs.unstable.gemini-cli) ++
|
|
(lib.optional (cfg.bubblewrap.enable && pkgs.stdenv.isLinux) pkgs.unstable.bubblewrap);
|
|
})
|
|
];
|
|
}
|