Merge feature/home-profile-restructuring: home-manager profile refactoring
Refactor home-manager configuration structure: - Reorganize from features/ to base/coding/desktop/server/profiles/ - Add language runtime modules (go, js, python, rust, typescript) - Add LSP server configuration - Add gaming and media profiles - Add shell modules (fish, nushell, starship) - Consolidate editor and git configuration
This commit is contained in:
74
home/coding/agents/agents.nix
Normal file
74
home/coding/agents/agents.nix
Normal file
@@ -0,0 +1,74 @@
|
||||
# AI agent system — OpenCode, Pi, and MCP server configuration.
|
||||
# Relies on coding.agents options provided by home/common/default.nix
|
||||
# (inputs.m3ta-nixpkgs.homeManagerModules.default).
|
||||
{
|
||||
config,
|
||||
inputs,
|
||||
lib,
|
||||
pkgs,
|
||||
videoDrivers ? [],
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
# OpenCode and Pi agent configurations
|
||||
./opencode.nix
|
||||
./pi.nix
|
||||
];
|
||||
|
||||
coding.agents.skills = {
|
||||
agentsInput = inputs.agents;
|
||||
externalSkills = [
|
||||
{
|
||||
src = inputs.skills-anthropic;
|
||||
selectSkills = ["pdf" "docx" "frontend-design"];
|
||||
}
|
||||
{src = inputs.skills-superpowers;}
|
||||
{src = inputs.skills-vercel;}
|
||||
{src = inputs.skills-basecamp;}
|
||||
{src = inputs.skills-kestra;}
|
||||
];
|
||||
};
|
||||
|
||||
programs.mcp = {
|
||||
enable = true;
|
||||
servers = {
|
||||
DeepWiki = {
|
||||
url = "https://mcp.deepwiki.com/mcp";
|
||||
};
|
||||
Ref = {
|
||||
command = "bash";
|
||||
args = ["-c" "REF_API_KEY=$(cat /run/agenix/ref-key) exec bunx ref-tools-mcp@latest"];
|
||||
};
|
||||
Exa = {
|
||||
command = "bash";
|
||||
args = ["-c" "EXA_API_KEY=$(cat /run/agenix/exa-key) exec bunx exa-mcp-server@latest tools=web_search_exa"];
|
||||
};
|
||||
Outline = {
|
||||
url = "https://wiki.az-gruppe.com/mcp";
|
||||
};
|
||||
ContextMode = {
|
||||
command = "bash";
|
||||
args = ["-c" "exec bunx context-mode@latest"];
|
||||
};
|
||||
Honcho = {
|
||||
command = "bash";
|
||||
args = [
|
||||
"-c"
|
||||
''exec bunx mcp-remote@latest https://mcp.honcho.dev --header "Authorization:Bearer $(cat /run/agenix/honcho-key)" --header "X-Honcho-User-Name:m3tam3re"''
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
agenix-cli
|
||||
agent-browser
|
||||
pyrefly
|
||||
(qmd.override {
|
||||
vulkanSupport = videoDrivers == ["amdgpu"];
|
||||
cudaSupport = videoDrivers == ["nvidia"];
|
||||
})
|
||||
openshell
|
||||
openspec
|
||||
];
|
||||
}
|
||||
116
home/coding/agents/opencode.nix
Normal file
116
home/coding/agents/opencode.nix
Normal file
@@ -0,0 +1,116 @@
|
||||
{
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
coding.agents.opencode = {
|
||||
enable = true;
|
||||
agentsInput = inputs.agents;
|
||||
};
|
||||
|
||||
coding.opencode = {
|
||||
enable = true;
|
||||
|
||||
ohMyOpencodeSettings = {
|
||||
agents = {
|
||||
sisyphus.model = "litellm/claude-opus-4-6";
|
||||
oracle.model = "litellm/claude-sonnet-4-6";
|
||||
librarian.model = "litellm/claude-sonnet-4-6";
|
||||
explore.model = "litellm/claude-haiku-4-5";
|
||||
multimodal-looker.model = "litellm/gpt-5.3-codex";
|
||||
prometheus.model = "litellm/claude-opus-4-6";
|
||||
metis.model = "litellm/claude-opus-4-6";
|
||||
momus.model = "litellm/claude-opus-4-6";
|
||||
atlas.model = "litellm/claude-sonnet-4-6";
|
||||
};
|
||||
categories = {
|
||||
visual-engineering.model = "zai-coding-plan/glm-5.1";
|
||||
ultrabrain.model = "litellm/claude-opus-4-6";
|
||||
deep.model = "litellm/claude-sonnet-4-6";
|
||||
artistry.model = "zai-coding-plan/glm-5.1";
|
||||
quick.model = "litellm/claude-haiku-4-5";
|
||||
unspecified-low.model = "litellm/claude-sonnet-4-6";
|
||||
unspecified-high.model = "litellm/claude-opus-4-6";
|
||||
writing.model = "zai-coding-plan/glm-5.1";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Keep TUI settings in programs.opencode.tui to satisfy OpenCode v1.2.15+.
|
||||
programs.opencode.tui.theme = "opencode";
|
||||
|
||||
# Override legacy default settings to avoid deprecated TUI keys in settings.
|
||||
programs.opencode.settings = lib.mkForce {
|
||||
plugin = ["oh-my-openagent"];
|
||||
formatter = {
|
||||
alejandra = {
|
||||
command = ["alejandra" "-q" "-"];
|
||||
extensions = [".nix"];
|
||||
};
|
||||
};
|
||||
|
||||
# AZ-Gruppe LiteLLM endpoint + available models
|
||||
provider = {
|
||||
litellm = {
|
||||
npm = "@ai-sdk/openai-compatible";
|
||||
name = "LiteLLM (AZ-Gruppe)";
|
||||
options.baseURL = "https://llm.az-gruppe.com/v1";
|
||||
models = {
|
||||
"gpt-5.2" = {
|
||||
name = "GPT-5.2";
|
||||
limit = {
|
||||
context = 400000;
|
||||
output = 128000;
|
||||
};
|
||||
};
|
||||
"gpt-5.3-codex" = {
|
||||
name = "GPT-5.3 Codex";
|
||||
limit = {
|
||||
context = 400000;
|
||||
output = 128000;
|
||||
};
|
||||
};
|
||||
"claude-haiku-4-5" = {
|
||||
name = "Claude Haiku 4.5";
|
||||
options = {
|
||||
thinking = {
|
||||
type = "enabled";
|
||||
budget_tokens = 16000;
|
||||
};
|
||||
};
|
||||
limit = {
|
||||
context = 200000;
|
||||
output = 64000;
|
||||
};
|
||||
};
|
||||
"claude-sonnet-4-6" = {
|
||||
name = "Claude Sonnet 4.6";
|
||||
options = {
|
||||
thinking = {
|
||||
type = "enabled";
|
||||
budget_tokens = 16000;
|
||||
};
|
||||
};
|
||||
limit = {
|
||||
context = 200000;
|
||||
output = 64000;
|
||||
};
|
||||
};
|
||||
"claude-opus-4-6" = {
|
||||
name = "Claude Opus 4.6";
|
||||
options = {
|
||||
thinking = {
|
||||
type = "enabled";
|
||||
budget_tokens = 16000;
|
||||
};
|
||||
};
|
||||
limit = {
|
||||
context = 200000;
|
||||
output = 128000;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
56
home/coding/agents/pi.nix
Normal file
56
home/coding/agents/pi.nix
Normal file
@@ -0,0 +1,56 @@
|
||||
{inputs, ...}: {
|
||||
coding.agents.pi = {
|
||||
enable = true;
|
||||
agentsInput = inputs.agents;
|
||||
|
||||
modelOverrides = {
|
||||
chiron = "minimax/MiniMax-M2.7";
|
||||
chiron-forge = "minimax/MiniMax-M2.7";
|
||||
};
|
||||
|
||||
# Coding rules for Pi agent
|
||||
# Rules sourced from AGENTS repo
|
||||
codingRules = {
|
||||
# Language-specific rules
|
||||
languages = [
|
||||
"nix" # Nix language conventions
|
||||
];
|
||||
|
||||
# Standard concerns from AGENTS repo
|
||||
concerns = [
|
||||
"coding-style" # General coding principles
|
||||
"naming" # Naming conventions (camelCase, snake_case, etc.)
|
||||
"documentation" # Documentation standards
|
||||
"testing" # Testing guidelines (Arrange-Act-Assert)
|
||||
"git-workflow" # Conventional commits, branch naming
|
||||
"project-structure" # Project layout conventions
|
||||
];
|
||||
|
||||
# No framework-specific rules for NixOS config
|
||||
frameworks = [];
|
||||
};
|
||||
|
||||
settings = {
|
||||
packages = [
|
||||
"npm:@thesethrose/pi-zai-provider"
|
||||
"npm:pi-mcp-adapter"
|
||||
"npm:pi-subagents"
|
||||
"npm:pi-lens"
|
||||
"npm:pi-web-access"
|
||||
"npm:pi-prompt-template-model"
|
||||
"npm:@plannotator/pi-extension"
|
||||
"npm:pi-powerline-footer"
|
||||
"npm:pi-markdown-preview"
|
||||
"npm:pi-tool-display"
|
||||
"npm:pi-agent-browser-native"
|
||||
"git:github.com/hk-vk/pi-connect"
|
||||
];
|
||||
|
||||
defaultProvider = "minimax";
|
||||
defaultModel = "MiniMax-M2.7";
|
||||
defaultThinkingLevel = "high";
|
||||
};
|
||||
|
||||
# MCP servers auto-inherited from programs.mcp in default.nix
|
||||
};
|
||||
}
|
||||
12
home/coding/default.nix
Normal file
12
home/coding/default.nix
Normal file
@@ -0,0 +1,12 @@
|
||||
# Coding environment aggregator — profile-independent development tooling.
|
||||
# Imports editors, LSP servers, git configuration, the agent system, language runtimes, and optional packages.
|
||||
{...}: {
|
||||
imports = [
|
||||
./editor
|
||||
./lsp
|
||||
./git/git.nix
|
||||
./agents/agents.nix
|
||||
./languages
|
||||
./packages.nix
|
||||
];
|
||||
}
|
||||
6
home/coding/editor/default.nix
Normal file
6
home/coding/editor/default.nix
Normal file
@@ -0,0 +1,6 @@
|
||||
# Editor aggregator — delegates to m3ta-nixpkgs editor modules.
|
||||
{...}: {
|
||||
imports = [
|
||||
./neovim.nix
|
||||
];
|
||||
}
|
||||
7
home/coding/editor/neovim.nix
Normal file
7
home/coding/editor/neovim.nix
Normal file
@@ -0,0 +1,7 @@
|
||||
# NeoVim base configuration via m3ta-nixpkgs coding.editors module.
|
||||
# The option `coding.editors.neovim.enable` is declared by
|
||||
# inputs.m3ta-nixpkgs.homeManagerModules.default — no re-declaration here.
|
||||
{...}: {
|
||||
# Placeholder for host-agnostic NeoVim overrides.
|
||||
# Set coding.editors.neovim.enable = true in per-host files to activate.
|
||||
}
|
||||
41
home/coding/git/git.nix
Normal file
41
home/coding/git/git.nix
Normal file
@@ -0,0 +1,41 @@
|
||||
# Git configuration with signing, aliases, and global ignore.
|
||||
# Identity and host-specific SSH keys are set per-host in home/m3tam3re/.
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; {
|
||||
programs.git = {
|
||||
enable = true;
|
||||
signing.format = null;
|
||||
settings = {
|
||||
user = {
|
||||
name = lib.mkDefault "m3tam3re";
|
||||
email = lib.mkDefault "p@m3ta.dev";
|
||||
};
|
||||
core.excludesfile = "~/.gitignore_global";
|
||||
init.defaultBranch = "master";
|
||||
alias = {
|
||||
st = "status";
|
||||
logd = "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
programs.difftastic.enable = true;
|
||||
|
||||
programs.jujutsu = {
|
||||
enable = true;
|
||||
settings = {
|
||||
user = {
|
||||
email = "m@m3tam3re.com";
|
||||
name = "Sascha Koenig";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
lazygit
|
||||
];
|
||||
}
|
||||
10
home/coding/languages/default.nix
Normal file
10
home/coding/languages/default.nix
Normal file
@@ -0,0 +1,10 @@
|
||||
# Language runtimes — Python, JavaScript, Rust, Go, TypeScript.
|
||||
{...}: {
|
||||
imports = [
|
||||
./python.nix
|
||||
./javascript.nix
|
||||
./rust-toolchain.nix
|
||||
./go.nix
|
||||
./typescript.nix
|
||||
];
|
||||
}
|
||||
19
home/coding/languages/go.nix
Normal file
19
home/coding/languages/go.nix
Normal file
@@ -0,0 +1,19 @@
|
||||
# Go toolchain — compiler and language server.
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.coding.languages.go;
|
||||
in {
|
||||
options.coding.languages.go.enable = mkEnableOption "Go toolchain";
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = with pkgs; [
|
||||
go
|
||||
gopls
|
||||
];
|
||||
};
|
||||
}
|
||||
25
home/coding/languages/javascript.nix
Normal file
25
home/coding/languages/javascript.nix
Normal file
@@ -0,0 +1,25 @@
|
||||
# JavaScript/TypeScript runtime — Node.js and Bun.
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.coding.languages.javascript;
|
||||
npmGlobalPrefix = "${config.home.homeDirectory}/.npm-global";
|
||||
in {
|
||||
options.coding.languages.javascript.enable = mkEnableOption "JavaScript runtime (Node.js + Bun)";
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = with pkgs; [
|
||||
nodejs
|
||||
bun
|
||||
];
|
||||
|
||||
home.file.".npmrc".text = ''
|
||||
prefix=${npmGlobalPrefix}
|
||||
'';
|
||||
home.sessionVariables.NPM_CONFIG_PREFIX = npmGlobalPrefix;
|
||||
};
|
||||
}
|
||||
30
home/coding/languages/python.nix
Normal file
30
home/coding/languages/python.nix
Normal file
@@ -0,0 +1,30 @@
|
||||
# Python runtime with pip and uv.
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.coding.languages.python;
|
||||
in {
|
||||
options.coding.languages.python = {
|
||||
enable = mkEnableOption "Python runtime with pip and uv";
|
||||
extraPackages = mkOption {
|
||||
type = types.listOf types.package;
|
||||
default = [];
|
||||
example = literalExpression "[ pkgs.python3Packages.numpy ]";
|
||||
description = "Additional Python packages to include";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = [
|
||||
(pkgs.python3.withPackages (ps:
|
||||
with ps; [
|
||||
pip
|
||||
uv
|
||||
] ++ cfg.extraPackages))
|
||||
];
|
||||
};
|
||||
}
|
||||
20
home/coding/languages/rust-toolchain.nix
Normal file
20
home/coding/languages/rust-toolchain.nix
Normal file
@@ -0,0 +1,20 @@
|
||||
# Rust toolchain — compiler, package manager, and language server.
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.coding.languages.rustToolchain;
|
||||
in {
|
||||
options.coding.languages.rustToolchain.enable = mkEnableOption "Rust toolchain";
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = with pkgs; [
|
||||
rustc
|
||||
cargo
|
||||
rust-analyzer
|
||||
];
|
||||
};
|
||||
}
|
||||
19
home/coding/languages/typescript.nix
Normal file
19
home/coding/languages/typescript.nix
Normal file
@@ -0,0 +1,19 @@
|
||||
# TypeScript support — language server and type checking tools.
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.coding.languages.typescript;
|
||||
in {
|
||||
options.coding.languages.typescript.enable = mkEnableOption "TypeScript support";
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = with pkgs; [
|
||||
typescript
|
||||
typescript-language-server
|
||||
];
|
||||
};
|
||||
}
|
||||
6
home/coding/lsp/default.nix
Normal file
6
home/coding/lsp/default.nix
Normal file
@@ -0,0 +1,6 @@
|
||||
# LSP aggregator — language server protocol tooling.
|
||||
{...}: {
|
||||
imports = [
|
||||
./servers.nix
|
||||
];
|
||||
}
|
||||
23
home/coding/lsp/servers.nix
Normal file
23
home/coding/lsp/servers.nix
Normal file
@@ -0,0 +1,23 @@
|
||||
# LSP server configuration — language servers for the development environment.
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.coding.lsp;
|
||||
in {
|
||||
options.coding.lsp.enable = mkEnableOption "enable LSP servers";
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = with pkgs; [
|
||||
# Nix
|
||||
nixd
|
||||
# General
|
||||
typescript-language-server
|
||||
tailwindcss-language-server
|
||||
pyrefly
|
||||
];
|
||||
};
|
||||
}
|
||||
20
home/coding/packages.nix
Normal file
20
home/coding/packages.nix
Normal file
@@ -0,0 +1,20 @@
|
||||
# Additional coding packages — API clients and GUI development tools.
|
||||
# Opt-in since not all coding hosts need these desktop-oriented tools.
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.coding.packages;
|
||||
in {
|
||||
options.coding.packages.enable = mkEnableOption "additional coding packages (bruno, insomnia)";
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = [
|
||||
pkgs.bruno
|
||||
pkgs.insomnia
|
||||
];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user