feat: cleaned up ai tooling
This commit is contained in:
parent
4eb36ddfc7
commit
0ca99c1835
19 changed files with 48 additions and 4668 deletions
83
flake.lock
generated
83
flake.lock
generated
|
|
@ -75,24 +75,6 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-parts_2": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": "nixpkgs-lib_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1767609335,
|
||||
"narHash": "sha256-feveD98mQpptwrAEggBQKJTYbvwwglSbOv53uCfH9PY=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "250481aafeb741edfe23d29195671c19b36b6dca",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
|
|
@ -221,25 +203,6 @@
|
|||
"url": "https://git.lix.systems/lix-project/nixos-module.git"
|
||||
}
|
||||
},
|
||||
"mcp-nixos": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts_2",
|
||||
"nixpkgs": "nixpkgs"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1775229475,
|
||||
"narHash": "sha256-A7KhRVOqLmtta507DPZoKbO8D1AlMMDWLMfHEBhEAxY=",
|
||||
"owner": "utensils",
|
||||
"repo": "mcp-nixos",
|
||||
"rev": "68c272fb930de52502d97aae91d8f7ed7edd9e0e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "utensils",
|
||||
"repo": "mcp-nixos",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-darwin": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
|
|
@ -319,15 +282,15 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1767640445,
|
||||
"narHash": "sha256-UWYqmD7JFBEDBHWYcqE6s6c77pWdcU/i+bwD6XxMb8A=",
|
||||
"owner": "NixOS",
|
||||
"lastModified": 1775036866,
|
||||
"narHash": "sha256-ZojAnPuCdy657PbTq5V0Y+AHKhZAIwSIT2cb8UgAz/U=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "9f0c42f8bc7151b8e7e5840fb3bd454ad850d8c5",
|
||||
"rev": "6201e203d09599479a3b3450ed24fa81537ebc4e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
|
|
@ -348,38 +311,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-lib_2": {
|
||||
"locked": {
|
||||
"lastModified": 1765674936,
|
||||
"narHash": "sha256-k00uTP4JNfmejrCLJOwdObYC9jHRrr/5M/a/8L2EIdo=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixpkgs.lib",
|
||||
"rev": "2075416fcb47225d9b68ac469a5c4801a9c4dd85",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "nixpkgs.lib",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1775036866,
|
||||
"narHash": "sha256-ZojAnPuCdy657PbTq5V0Y+AHKhZAIwSIT2cb8UgAz/U=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "6201e203d09599479a3b3450ed24fa81537ebc4e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_3": {
|
||||
"locked": {
|
||||
"lastModified": 1759070547,
|
||||
"narHash": "sha256-JVZl8NaVRYb0+381nl7LvPE+A774/dRpif01FKLrYFQ=",
|
||||
|
|
@ -397,7 +329,7 @@
|
|||
},
|
||||
"noita-entangled-worlds": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs_3",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"rust-overlay": "rust-overlay",
|
||||
"systems": "systems_2"
|
||||
},
|
||||
|
|
@ -426,12 +358,11 @@
|
|||
"impermanence": "impermanence",
|
||||
"import-tree": "import-tree",
|
||||
"lix-module": "lix-module",
|
||||
"mcp-nixos": "mcp-nixos",
|
||||
"nix-darwin": "nix-darwin",
|
||||
"nix-syncthing": "nix-syncthing",
|
||||
"nix-vscode-extensions": "nix-vscode-extensions",
|
||||
"nixos-hardware": "nixos-hardware",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"noita-entangled-worlds": "noita-entangled-worlds",
|
||||
"secrets": "secrets",
|
||||
"sops-nix": "sops-nix"
|
||||
|
|
|
|||
|
|
@ -78,12 +78,6 @@
|
|||
url = "github:edolstra/flake-compat";
|
||||
};
|
||||
|
||||
# MCP NixOS server for Claude Dev
|
||||
mcp-nixos = {
|
||||
url = "github:utensils/mcp-nixos";
|
||||
# Not following nixpkgs because aws-sam-translator doesn't support Python 3.14 yet
|
||||
};
|
||||
|
||||
# Noita Entangled Worlds package
|
||||
# Not following our nixpkgs so it can use its own rust-overlay configuration
|
||||
noita-entangled-worlds = {
|
||||
|
|
|
|||
|
|
@ -1,47 +0,0 @@
|
|||
{...}: {
|
||||
flake.homeModules.home-manager-vscode-ai-code = {
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
pkgsRepository = pkgs.codium-extensions;
|
||||
in {
|
||||
options.programs.vscode.profiles = lib.mkOption {
|
||||
type = lib.types.attrsOf (lib.types.submodule ({config, ...}: {
|
||||
options = {
|
||||
extraExtensions.aiCode = {
|
||||
enable = lib.mkEnableOption "should the ai code extension for vscode be enabled";
|
||||
extension = lib.mkPackageOption pkgsRepository "ai-code" {};
|
||||
ollamaHost = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.str;
|
||||
description = "what host should be used for ollama";
|
||||
default = null;
|
||||
};
|
||||
inlineCompletion = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
description = "should inline completion be enabled";
|
||||
default = true;
|
||||
};
|
||||
model = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.str;
|
||||
description = "what model should be used for ollama";
|
||||
default = null;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
config = lib.mkIf config.extraExtensions.aiCode.enable {
|
||||
extensions = [
|
||||
config.extraExtensions.aiCode.extension
|
||||
];
|
||||
userSettings = {
|
||||
"aiCode.ollamaHost" = lib.mkIf (config.extraExtensions.aiCode.ollamaHost != null) config.extraExtensions.aiCode.ollamaHost;
|
||||
"aiCode.inlineCompletion.enable" = config.extraExtensions.aiCode.inlineCompletion.enable;
|
||||
"aiCode.inlineCompletion.model" = lib.mkIf (config.extraExtensions.aiCode.inlineCompletion.model != null) config.extraExtensions.aiCode.inlineCompletion.model;
|
||||
};
|
||||
};
|
||||
}));
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,239 +0,0 @@
|
|||
{...}: {
|
||||
flake.homeModules.home-manager-vscode-claude-dev = {
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
inputs,
|
||||
...
|
||||
}: let
|
||||
pkgsRepositories = pkgs.nix-vscode-extensions.forVSCodeVersion config.programs.vscode.package.version;
|
||||
pkgsRepository = pkgsRepositories.open-vsx;
|
||||
|
||||
mcp-nixos = inputs.mcp-nixos.packages.${pkgs.stdenv.hostPlatform.system}.default;
|
||||
|
||||
anyProfileHasInstallTool = lib.any (
|
||||
profile:
|
||||
profile.extraExtensions.claudeDev.enable
|
||||
&& profile.extraExtensions.claudeDev.installTool
|
||||
) (lib.attrValues config.programs.vscode.profiles);
|
||||
|
||||
getInstallToolPackage = lib.findFirst (package: package != null) pkgs.cline (map (
|
||||
profile:
|
||||
if profile.extraExtensions.claudeDev.enable && profile.extraExtensions.claudeDev.installTool
|
||||
then profile.extraExtensions.claudeDev.package
|
||||
else null
|
||||
) (lib.attrValues config.programs.vscode.profiles));
|
||||
|
||||
anyProfileHasMcpNixos = lib.any (
|
||||
profile:
|
||||
profile.extraExtensions.claudeDev.enable
|
||||
&& profile.extraExtensions.claudeDev.mcp.nixos.enable
|
||||
) (lib.attrValues config.programs.vscode.profiles);
|
||||
|
||||
anyProfileHasMcpEslint = lib.any (
|
||||
profile:
|
||||
profile.extraExtensions.claudeDev.enable
|
||||
&& profile.extraExtensions.claudeDev.mcp.eslint.enable
|
||||
) (lib.attrValues config.programs.vscode.profiles);
|
||||
|
||||
anyProfileHasMcpVitest = lib.any (
|
||||
profile:
|
||||
profile.extraExtensions.claudeDev.enable
|
||||
&& profile.extraExtensions.claudeDev.mcp.vitest.enable
|
||||
) (lib.attrValues config.programs.vscode.profiles);
|
||||
|
||||
anyProfileHasMcpSleep = lib.any (
|
||||
profile:
|
||||
profile.extraExtensions.claudeDev.enable
|
||||
&& profile.extraExtensions.claudeDev.mcp.sleep.enable
|
||||
) (lib.attrValues config.programs.vscode.profiles);
|
||||
|
||||
anyProfileHasMcp = anyProfileHasMcpNixos || anyProfileHasMcpEslint || anyProfileHasMcpVitest || anyProfileHasMcpSleep;
|
||||
|
||||
getMcpTimeout = serverName:
|
||||
lib.findFirst (timeout: timeout != null) null (map (
|
||||
profile:
|
||||
if profile.extraExtensions.claudeDev.enable && profile.extraExtensions.claudeDev.mcp.${serverName}.enable
|
||||
then profile.extraExtensions.claudeDev.mcp.${serverName}.timeout
|
||||
else null
|
||||
) (lib.attrValues config.programs.vscode.profiles));
|
||||
|
||||
getMcpAutoApprove = serverName:
|
||||
lib.foldl' (
|
||||
acc: profile:
|
||||
if profile.extraExtensions.claudeDev.enable && profile.extraExtensions.claudeDev.mcp.${serverName}.enable
|
||||
then acc // profile.extraExtensions.claudeDev.mcp.${serverName}.autoApprove
|
||||
else acc
|
||||
) {} (lib.attrValues config.programs.vscode.profiles);
|
||||
|
||||
getMcpPackage = serverName:
|
||||
lib.findFirst (package: package != null) null (map (
|
||||
profile:
|
||||
if profile.extraExtensions.claudeDev.enable && profile.extraExtensions.claudeDev.mcp.${serverName}.enable
|
||||
then profile.extraExtensions.claudeDev.mcp.${serverName}.package
|
||||
else null
|
||||
) (lib.attrValues config.programs.vscode.profiles));
|
||||
in {
|
||||
options.programs.vscode.profiles = lib.mkOption {
|
||||
type = lib.types.attrsOf (lib.types.submodule ({config, ...}: {
|
||||
options = {
|
||||
extraExtensions.claudeDev = {
|
||||
enable = lib.mkEnableOption "should the claude-dev extension for vscode be enabled";
|
||||
extension = lib.mkPackageOption pkgsRepository "claude-dev" {
|
||||
default = ["saoudrizwan" "claude-dev"];
|
||||
};
|
||||
|
||||
installTool = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
description = "Whether to install the cline CLI tool for subagent support when the extension is enabled";
|
||||
};
|
||||
package = lib.mkOption {
|
||||
type = lib.types.package;
|
||||
default = pkgs.cline;
|
||||
description = "The package to install for the cline CLI tool";
|
||||
};
|
||||
|
||||
mcp = {
|
||||
nixos = {
|
||||
enable = lib.mkEnableOption "enable NixOS MCP server for Claude Dev";
|
||||
autoApprove = {
|
||||
nixos_search = lib.mkEnableOption "should the nixos_search tool be auto approved for the nixos MCP server";
|
||||
nixos_info = lib.mkEnableOption "should the nixos_info tool be auto approved for the nixos MCP server";
|
||||
home_manager_search = lib.mkEnableOption "should the home_manager_search tool be auto approved for the nixos MCP server";
|
||||
home_manager_info = lib.mkEnableOption "should the home_manager_info tool be auto approved for the nixos MCP server";
|
||||
darwin_search = lib.mkEnableOption "should the darwin_search tool be auto approved for the nixos MCP server";
|
||||
darwin_info = lib.mkEnableOption "should the darwin_info tool be auto approved for the nixos MCP server";
|
||||
nixos_flakes_search = lib.mkEnableOption "should the nixos_flakes_search tool be auto approved for the nixos MCP server";
|
||||
};
|
||||
};
|
||||
eslint = {
|
||||
enable = lib.mkEnableOption "enable ESLint MCP server for Claude Dev";
|
||||
package = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "@eslint/mcp@latest";
|
||||
description = "NPM package to use for ESLint MCP server";
|
||||
};
|
||||
timeout = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.int;
|
||||
default = null;
|
||||
description = "Timeout in seconds for ESLint MCP server operations";
|
||||
};
|
||||
autoApprove = {
|
||||
lint-files = lib.mkEnableOption "Should the lint-files tool be auto approved for ESLint MCP server";
|
||||
};
|
||||
};
|
||||
vitest = {
|
||||
enable = lib.mkEnableOption "enable Vitest MCP server for Claude Dev";
|
||||
package = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "@djankies/vitest-mcp";
|
||||
description = "NPM package to use for Vitest MCP server";
|
||||
};
|
||||
timeout = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.int;
|
||||
default = null;
|
||||
description = "Timeout in seconds for Vitest MCP server operations";
|
||||
};
|
||||
autoApprove = {
|
||||
list_tests = lib.mkEnableOption "Should the list_tests tool be auto approved for Vitest MCP server";
|
||||
run_tests = lib.mkEnableOption "Should the run_tests tool be auto approved for Vitest MCP server";
|
||||
analyze_coverage = lib.mkEnableOption "Should the analyze_coverage tool be auto approved for Vitest MCP server";
|
||||
set_project_root = lib.mkEnableOption "Should the set_project_root tool be auto approved for Vitest MCP server";
|
||||
};
|
||||
};
|
||||
sleep = {
|
||||
enable = lib.mkEnableOption "enable Sleep MCP server for Claude Dev";
|
||||
package = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "sleep-mcp";
|
||||
description = "NPM package to use for Sleep MCP server";
|
||||
};
|
||||
timeout = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.int;
|
||||
default = null;
|
||||
description = "Timeout in seconds for Sleep MCP server operations";
|
||||
};
|
||||
autoApprove = {
|
||||
sleep = lib.mkEnableOption "Should the sleep tool be auto approved for Sleep MCP server";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
config = lib.mkIf config.extraExtensions.claudeDev.enable {
|
||||
extensions = [
|
||||
config.extraExtensions.claudeDev.extension
|
||||
];
|
||||
};
|
||||
}));
|
||||
};
|
||||
|
||||
config = lib.mkMerge [
|
||||
(lib.mkIf anyProfileHasInstallTool {
|
||||
home.packages = [
|
||||
getInstallToolPackage
|
||||
];
|
||||
})
|
||||
|
||||
(lib.mkIf anyProfileHasMcpNixos {
|
||||
home.packages = [
|
||||
mcp-nixos
|
||||
];
|
||||
})
|
||||
|
||||
(lib.mkIf anyProfileHasMcp {
|
||||
home.file."${config.xdg.configHome}/VSCodium/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json" = {
|
||||
text = builtins.toJSON {
|
||||
mcpServers =
|
||||
(lib.optionalAttrs anyProfileHasMcpNixos {
|
||||
nixos = {
|
||||
command = "${mcp-nixos}/bin/mcp-nixos";
|
||||
};
|
||||
})
|
||||
// (lib.optionalAttrs anyProfileHasMcpEslint {
|
||||
eslint =
|
||||
{
|
||||
command = "${pkgs.nodejs}/bin/npx";
|
||||
args = ["-y" (getMcpPackage "eslint")];
|
||||
}
|
||||
// (lib.optionalAttrs ((getMcpTimeout "eslint") != null) {
|
||||
timeout = getMcpTimeout "eslint";
|
||||
})
|
||||
// (lib.optionalAttrs ((getMcpAutoApprove "eslint") != {}) {
|
||||
autoApprove = builtins.attrNames (lib.filterAttrs (_: v: v) (getMcpAutoApprove "eslint"));
|
||||
});
|
||||
})
|
||||
// (lib.optionalAttrs anyProfileHasMcpVitest {
|
||||
vitest =
|
||||
{
|
||||
command = "${pkgs.nodejs}/bin/npx";
|
||||
args = ["-y" (getMcpPackage "vitest")];
|
||||
}
|
||||
// (lib.optionalAttrs ((getMcpTimeout "vitest") != null) {
|
||||
timeout = getMcpTimeout "vitest";
|
||||
})
|
||||
// (lib.optionalAttrs ((getMcpAutoApprove "vitest") != {}) {
|
||||
autoApprove = builtins.attrNames (lib.filterAttrs (_: v: v) (getMcpAutoApprove "vitest"));
|
||||
});
|
||||
})
|
||||
// (lib.optionalAttrs anyProfileHasMcpSleep {
|
||||
sleep-mcp =
|
||||
{
|
||||
command = "${pkgs.nodejs}/bin/npx";
|
||||
args = ["-y" (getMcpPackage "sleep")];
|
||||
}
|
||||
// (lib.optionalAttrs ((getMcpTimeout "sleep") != null) {
|
||||
timeout = getMcpTimeout "sleep";
|
||||
})
|
||||
// (lib.optionalAttrs ((getMcpAutoApprove "sleep") != {}) {
|
||||
autoApprove = builtins.attrNames (lib.filterAttrs (_: v: v) (getMcpAutoApprove "sleep"));
|
||||
});
|
||||
});
|
||||
};
|
||||
force = true;
|
||||
};
|
||||
})
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
@ -3,12 +3,10 @@
|
|||
in {
|
||||
flake.homeModules.home-manager-vscode = {
|
||||
imports = [
|
||||
mod.home-manager-vscode-ai-code
|
||||
mod.home-manager-vscode-alejandra
|
||||
mod.home-manager-vscode-astro-vscode
|
||||
mod.home-manager-vscode-atom-keybindings
|
||||
mod.home-manager-vscode-auto-rename-tag
|
||||
mod.home-manager-vscode-claude-dev
|
||||
mod.home-manager-vscode-conventional-commits
|
||||
mod.home-manager-vscode-direnv
|
||||
mod.home-manager-vscode-es7-react-js-snippets
|
||||
|
|
|
|||
|
|
@ -19,7 +19,6 @@
|
|||
home.packages = lib.lists.optionals userConfig.isDesktopUser (
|
||||
with pkgs; [
|
||||
gnomeExtensions.dash-to-panel
|
||||
claude-code
|
||||
friture
|
||||
]
|
||||
);
|
||||
|
|
@ -77,7 +76,15 @@
|
|||
libreoffice.enable = true;
|
||||
noita-entangled-worlds.enable = true;
|
||||
|
||||
claude-code.enable = true;
|
||||
opencode.enable = true;
|
||||
# TODO: enable defiant provider once emergent is on the same tailnet
|
||||
# opencode.settings.provider.defiant = {
|
||||
# npm = "@ai-sdk/openai-compatible";
|
||||
# name = "Ollama (defiant)";
|
||||
# options.baseURL = "http://defiant:11434/v1";
|
||||
# models."gpt-oss:120b".name = "GPT-OSS 120B";
|
||||
# };
|
||||
|
||||
e621-downloader.enable = true;
|
||||
|
||||
|
|
|
|||
|
|
@ -33,7 +33,15 @@
|
|||
openrgb.enable = hardware.openRGB.enable;
|
||||
via.enable = hardware.viaKeyboard.enable;
|
||||
claude-code.enable = true;
|
||||
opencode.enable = true;
|
||||
opencode = {
|
||||
enable = true;
|
||||
settings.provider.defiant = {
|
||||
npm = "@ai-sdk/openai-compatible";
|
||||
name = "Ollama (defiant)";
|
||||
options.baseURL = "http://defiant:11434/v1";
|
||||
models."gpt-oss:120b".name = "GPT-OSS 120B";
|
||||
};
|
||||
};
|
||||
davinci-resolve.enable = hardware.graphicsAcceleration.enable;
|
||||
mfoc.enable = true;
|
||||
})
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@
|
|||
...
|
||||
}: let
|
||||
nix-development-enabled = osConfig.host.nix-development.enable;
|
||||
ai-tooling-enabled = true;
|
||||
in {
|
||||
config = lib.mkIf config.user.isDesktopUser {
|
||||
programs = {
|
||||
|
|
@ -75,47 +74,6 @@
|
|||
# arduino development
|
||||
platformIO.enable = false;
|
||||
|
||||
# claude development
|
||||
claudeDev = lib.mkIf ai-tooling-enabled {
|
||||
enable = false;
|
||||
mcp = {
|
||||
nixos = {
|
||||
enable = true;
|
||||
autoApprove = {
|
||||
nixos_search = true;
|
||||
nixos_info = true;
|
||||
home_manager_search = true;
|
||||
home_manager_info = true;
|
||||
darwin_search = true;
|
||||
darwin_info = true;
|
||||
nixos_flakes_search = true;
|
||||
};
|
||||
};
|
||||
eslint = {
|
||||
enable = true;
|
||||
autoApprove = {
|
||||
lint-files = true;
|
||||
};
|
||||
};
|
||||
vitest = {
|
||||
enable = true;
|
||||
autoApprove = {
|
||||
list_tests = true;
|
||||
run_tests = true;
|
||||
analyze_coverage = true;
|
||||
set_project_root = true;
|
||||
};
|
||||
};
|
||||
sleep = {
|
||||
enable = true;
|
||||
timeout = 18000; # 5 hours to match claude codes timeout
|
||||
autoApprove = {
|
||||
sleep = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# misc extensions
|
||||
evenBetterToml.enable = true;
|
||||
direnv.enable = config.programs.direnv.enable;
|
||||
|
|
|
|||
|
|
@ -118,6 +118,9 @@
|
|||
# leave them alone so NM-wait-online doesn't time out waiting for them.
|
||||
networking.networkmanager.unmanaged = ["bond0" "wg0" "eno1" "eno2"];
|
||||
|
||||
# Only expose ollama over tailscale
|
||||
networking.firewall.interfaces."tailscale0".allowedTCPPorts = [11434];
|
||||
|
||||
systemd.network = {
|
||||
enable = true;
|
||||
|
||||
|
|
@ -260,10 +263,13 @@
|
|||
};
|
||||
};
|
||||
|
||||
# ollama = {
|
||||
# enable = true;
|
||||
# exposePort = true;
|
||||
# };
|
||||
ollama = {
|
||||
enable = true;
|
||||
host = "0.0.0.0";
|
||||
loadModels = [
|
||||
"gpt-oss:120b"
|
||||
];
|
||||
};
|
||||
tailscale = {
|
||||
enable = true;
|
||||
authKeyFile = config.sops.secrets."vpn-keys/tailscale-authkey/defiant".path;
|
||||
|
|
|
|||
|
|
@ -45,7 +45,6 @@
|
|||
services.desktopManager.gnome.enable = true;
|
||||
|
||||
host = {
|
||||
# ai.enable = true;
|
||||
users = {
|
||||
eve = {
|
||||
isDesktopUser = true;
|
||||
|
|
|
|||
|
|
@ -38,10 +38,6 @@
|
|||
hardware = {
|
||||
directAccess.enable = true;
|
||||
};
|
||||
|
||||
# ai = {
|
||||
# enable = true;
|
||||
# };
|
||||
};
|
||||
|
||||
virtualisation.docker.enable = true;
|
||||
|
|
@ -85,13 +81,6 @@
|
|||
};
|
||||
|
||||
syncthing.enable = true;
|
||||
|
||||
# ollama = {
|
||||
# enable = true;
|
||||
# loadModels = [
|
||||
# "llama3.1:8b"
|
||||
# ];
|
||||
# };
|
||||
};
|
||||
|
||||
# Enable network-online.target for better network dependency handling
|
||||
|
|
|
|||
|
|
@ -36,16 +36,8 @@
|
|||
graphicsAcceleration.enable = true;
|
||||
directAccess.enable = true;
|
||||
};
|
||||
# ai = {
|
||||
# enable = true;
|
||||
# };
|
||||
};
|
||||
services = {
|
||||
# ollama = {
|
||||
# enable = true;
|
||||
# exposePort = true;
|
||||
# };
|
||||
|
||||
tailscale = {
|
||||
enable = true;
|
||||
authKeyFile = config.sops.secrets."vpn-keys/tailscale-authkey/twilight".path;
|
||||
|
|
|
|||
4102
modules/nixos/pkgs/cline/cline-package-lock.json
generated
4102
modules/nixos/pkgs/cline/cline-package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -1,63 +0,0 @@
|
|||
{...}: let
|
||||
package = {
|
||||
lib,
|
||||
buildNpmPackage,
|
||||
fetchurl,
|
||||
ripgrep,
|
||||
makeWrapper,
|
||||
jq,
|
||||
...
|
||||
}:
|
||||
buildNpmPackage rec {
|
||||
pname = "cline";
|
||||
version = "2.4.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://registry.npmjs.org/cline/-/cline-${version}.tgz";
|
||||
hash = "sha256-2utOBC0vhoj5fR+cG+Vdo3N6+i/pNW1E4mESF/dZS/c=";
|
||||
};
|
||||
|
||||
sourceRoot = "package";
|
||||
|
||||
postPatch = ''
|
||||
cp ${./cline-package-lock.json} package-lock.json
|
||||
|
||||
# Remove @vscode/ripgrep from package.json since it tries to download
|
||||
# a binary from GitHub during install, which fails in the nix sandbox.
|
||||
# We provide ripgrep from nixpkgs instead via PATH wrapping.
|
||||
# Also remove the man field since the man page is not included in the npm tarball.
|
||||
${jq}/bin/jq 'del(.dependencies["@vscode/ripgrep"]) | del(.man)' package.json > package.json.tmp
|
||||
mv package.json.tmp package.json
|
||||
'';
|
||||
|
||||
npmDepsHash = "sha256-oHo60ghR7A4SUT0cLmIe7glPDYBK3twJ0F71RKVrxQc=";
|
||||
|
||||
dontNpmBuild = true;
|
||||
|
||||
# Skip post-install scripts to be safe
|
||||
npmFlags = ["--ignore-scripts"];
|
||||
|
||||
nativeBuildInputs = [makeWrapper jq];
|
||||
|
||||
# Provide ripgrep from nixpkgs since @vscode/ripgrep was removed
|
||||
postInstall = ''
|
||||
wrapProgram $out/bin/cline \
|
||||
--prefix PATH : ${lib.makeBinPath [ripgrep]}
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Autonomous coding agent CLI - capable of creating/editing files, running commands, using the browser, and more";
|
||||
homepage = "https://cline.bot";
|
||||
license = licenses.asl20;
|
||||
mainProgram = "cline";
|
||||
};
|
||||
};
|
||||
in {
|
||||
flake.commonModules.cline = {pkgs, ...}: {
|
||||
nixpkgs.overlays = [
|
||||
(final: prev: {
|
||||
cline = pkgs.callPackage package {};
|
||||
})
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
@ -1,46 +0,0 @@
|
|||
{...}: let
|
||||
package = {
|
||||
buildNpmPackage,
|
||||
vscode-utils,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
version = "0.0.1";
|
||||
pname = "ai-code";
|
||||
publisher = "jan-leila";
|
||||
vsix = buildNpmPackage {
|
||||
inherit version pname;
|
||||
|
||||
src = builtins.fetchGit {
|
||||
url = "ssh://git@git.jan-leila.com/jan-leila/ai-code.git";
|
||||
rev = "d48e01713021dbb30de0ebbee2cfaf99e4e9b5a6";
|
||||
};
|
||||
|
||||
npmDepsHash = "sha256-kjMyEnT3dz0yH5Ydh+aGoFDocKpBYGRmfnwbEdvvgpY=";
|
||||
|
||||
nativeBuildInputs = with pkgs; [
|
||||
vsce
|
||||
];
|
||||
|
||||
buildPhase = ''
|
||||
${pkgs.vsce}/bin/vsce package -o ${pname}.zip
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
mv ${pname}.zip $out/${pname}.zip
|
||||
'';
|
||||
};
|
||||
in
|
||||
vscode-utils.buildVscodeExtension {
|
||||
inherit pname version;
|
||||
|
||||
src = "${vsix}/${pname}.zip";
|
||||
|
||||
vscodeExtUniqueId = "${publisher}.${pname}";
|
||||
vscodeExtPublisher = publisher;
|
||||
vscodeExtName = pname;
|
||||
};
|
||||
in {
|
||||
flake.commonModules.codium-ai-code = package;
|
||||
}
|
||||
|
|
@ -2,9 +2,7 @@
|
|||
flake.commonModules.codium-extensions = {pkgs, ...}: {
|
||||
nixpkgs.overlays = [
|
||||
(final: prev: {
|
||||
codium-extensions = {
|
||||
ai-code = pkgs.callPackage config.flake.commonModules.codium-ai-code {};
|
||||
};
|
||||
codium-extensions = {};
|
||||
})
|
||||
];
|
||||
};
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ in {
|
|||
pkg.mapillary-uploader
|
||||
pkg.panoramax
|
||||
pkg.sgblur
|
||||
pkg.cline
|
||||
pkg.codium-extensions
|
||||
pkg.firefox-extensions
|
||||
pkg.python
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
forgejo = 2002;
|
||||
hass = 2004;
|
||||
syncthing = 2007;
|
||||
# ollama = 2008;
|
||||
ollama = 2008;
|
||||
git = 2009;
|
||||
immich = 2010;
|
||||
qbittorrent = 2011;
|
||||
|
|
@ -46,7 +46,7 @@
|
|||
forgejo = 2002;
|
||||
hass = 2004;
|
||||
syncthing = 2007;
|
||||
# ollama = 2008;
|
||||
ollama = 2008;
|
||||
git = 2009;
|
||||
immich = 2010;
|
||||
qbittorrent = 2011;
|
||||
|
|
@ -156,11 +156,11 @@
|
|||
group = config.users.users.syncthing.name;
|
||||
};
|
||||
|
||||
# ollama = {
|
||||
# uid = lib.mkForce uids.ollama;
|
||||
# isSystemUser = true;
|
||||
# group = config.users.users.ollama.name;
|
||||
# };
|
||||
ollama = {
|
||||
uid = lib.mkForce uids.ollama;
|
||||
isSystemUser = true;
|
||||
group = config.users.users.ollama.name;
|
||||
};
|
||||
|
||||
git = {
|
||||
uid = lib.mkForce uids.git;
|
||||
|
|
@ -293,12 +293,12 @@
|
|||
];
|
||||
};
|
||||
|
||||
# ollama = {
|
||||
# gid = lib.mkForce gids.ollama;
|
||||
# members = [
|
||||
# users.ollama.name
|
||||
# ];
|
||||
# };
|
||||
ollama = {
|
||||
gid = lib.mkForce gids.ollama;
|
||||
members = [
|
||||
users.ollama.name
|
||||
];
|
||||
};
|
||||
|
||||
git = {
|
||||
gid = lib.mkForce gids.git;
|
||||
|
|
|
|||
|
|
@ -109,8 +109,6 @@ in {
|
|||
pkgs.disko
|
||||
# for viewing dconf entries
|
||||
dconf-editor
|
||||
# for MCP NixOS server support in development
|
||||
inputs.mcp-nixos.packages.${system}.default
|
||||
];
|
||||
|
||||
SOPS_AGE_KEY_DIRECTORY = import ../const/sops_age_key_directory.nix;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue