feat: create new home/ directory structure for profile-based config
New structure:
- home/base/ - Always loaded (shell, cli-tools, secrets)
- home/coding/ - Profile-independent dev tooling (editor, lsp, git, agents)
- home/profiles/ - Freely combinable profiles (gaming, media)
- home/desktop/ - Desktop-only (wm, apps, theme)
- home/server/ - Minimal server stub
Migration sources:
- home/features/cli/ → home/base/{shell,cli-tools,secrets}
- home/features/desktop/hyprland,wayland,rofi → home/desktop/wm/
- home/features/desktop/obsidian,office,webapps,crypto → home/desktop/apps/
- home/features/desktop/fonts,theme,wallpapers → home/desktop/theme/
- gaming.nix split → home/profiles/gaming/{steam,gamescope}
- media.nix split → home/profiles/media/{obs,ffmpeg,yt-dlp,kdenlive,handbrake}
Option namespaces updated:
- features.cli.* → base.shell.* / base.cliTools.* / base.secrets
- features.desktop.* → desktop.wm.* / desktop.apps.* / desktop.theme.*
- features.desktop.gaming → profiles.gaming.*
- features.desktop.media → profiles.media.*
Verified: nix flake check passes (warnings only)
This commit is contained in:
103
home/coding/agents/agents.nix
Normal file
103
home/coding/agents/agents.nix
Normal file
@@ -0,0 +1,103 @@
|
||||
# AI agent system — OpenCode, Pi, and MCP server configuration.
|
||||
# References inputs.m3ta-nixpkgs.homeManagerModules.coding.agents for the base module.
|
||||
{
|
||||
config,
|
||||
inputs,
|
||||
lib,
|
||||
pkgs,
|
||||
videoDrivers,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
npmGlobalPrefix = "${config.home.homeDirectory}/.npm-global";
|
||||
in {
|
||||
home.file.".npmrc".text = ''
|
||||
prefix=${npmGlobalPrefix}
|
||||
'';
|
||||
home.sessionVariables.NPM_CONFIG_PREFIX = npmGlobalPrefix;
|
||||
|
||||
imports = [
|
||||
# OpenCode and Pi agent configurations
|
||||
../../features/coding/opencode.nix
|
||||
../../features/coding/pi.nix
|
||||
];
|
||||
|
||||
coding.agents.skills = {
|
||||
agentsInput = inputs.agents;
|
||||
externalSkills = [
|
||||
{
|
||||
src = inputs.skills-anthropic;
|
||||
selectSkills = ["pdf" "docx" "frontend-design"];
|
||||
}
|
||||
{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
|
||||
alejandra
|
||||
bc
|
||||
bun
|
||||
devpod
|
||||
gnumake
|
||||
cmake
|
||||
(python3.withPackages (ps:
|
||||
with ps; [
|
||||
pip
|
||||
uv
|
||||
numba
|
||||
numpy
|
||||
torch
|
||||
srt
|
||||
]))
|
||||
pyrefly
|
||||
nixd
|
||||
nix-update
|
||||
nodejs
|
||||
(qmd.override {
|
||||
vulkanSupport = videoDrivers == ["amdgpu"];
|
||||
cudaSupport = videoDrivers == ["nvidia"];
|
||||
})
|
||||
openshell
|
||||
openspec
|
||||
pi-coding-agent
|
||||
sidecar
|
||||
tailwindcss
|
||||
tailwindcss-language-server
|
||||
td
|
||||
];
|
||||
}
|
||||
10
home/coding/default.nix
Normal file
10
home/coding/default.nix
Normal file
@@ -0,0 +1,10 @@
|
||||
# Coding environment aggregator — profile-independent development tooling.
|
||||
# Imports editors, LSP servers, git configuration, and the agent system.
|
||||
{...}: {
|
||||
imports = [
|
||||
./editor
|
||||
./lsp
|
||||
./git/git.nix
|
||||
./agents/agents.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 editors module for NeoVim and Zed.
|
||||
{...}: {
|
||||
imports = [
|
||||
./neovim.nix
|
||||
];
|
||||
}
|
||||
17
home/coding/editor/neovim.nix
Normal file
17
home/coding/editor/neovim.nix
Normal file
@@ -0,0 +1,17 @@
|
||||
# NeoVim base configuration via m3ta-nixpkgs coding.editors module.
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.coding.editors.neovim;
|
||||
in {
|
||||
# coding.editors.neovim is provided by inputs.m3ta-nixpkgs.homeManagerModules.default
|
||||
options.coding.editors.neovim.enable = mkEnableOption "enable NeoVim editor";
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
# NeoVim configuration is managed by the m3ta-nixpkgs coding.editors module.
|
||||
# Additional host-specific overrides can be added here.
|
||||
};
|
||||
}
|
||||
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
|
||||
];
|
||||
}
|
||||
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
|
||||
];
|
||||
}
|
||||
22
home/coding/lsp/servers.nix
Normal file
22
home/coding/lsp/servers.nix
Normal file
@@ -0,0 +1,22 @@
|
||||
# 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
|
||||
nodePackages.typescript-language-server
|
||||
tailwindcss-language-server
|
||||
];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user