dotfiles/module/home-manager.nix
2026-08-01 07:21:18 +02:00

224 lines
5.2 KiB
Nix

{ email }: { config, inputs, pkgs, ... }:
{
home.file.".clojure/deps.edn".source = ../config/clojure/deps.edn;
home.file.".pi/web-search.json".text = builtins.toJSON {
workflow = "none";
allowBrowserCookies = false;
firecrawlBaseUrl = "https://api.firecrawl.dev";
firecrawlApiKey = "$FIRECRAWL_API_KEY";
firecrawlFreshScrape = true;
};
home.file.".pi/agent/extensions/subagent/config.json".text = builtins.toJSON {
artifactDir = "session";
};
home.file.".pi/agent/extensions/guardrails.json".text = builtins.toJSON {
version = "0.13.0-20260619";
features = {
policies = false;
permissionGate = true;
};
permissionGate = {
requireConfirmation = true;
patterns = [
{
pattern = "(^|[;&|])\\s*(ssh|scp|sftp)(\\s|$)";
description = "SSH connection or file transfer";
regex = true;
}
];
};
};
sops = {
age.keyFile = "${config.home.homeDirectory}/Library/Application Support/sops/age/keys.txt";
defaultSopsFile = ../secrets/secrets.yaml;
secrets.firecrawl_api_key = { };
secrets.ionos_pat = { };
};
targets.darwin.defaults = {
NSGlobalDomain = {
AppleLanguages = [ "en" "de" ];
AppleLocale = "en_US";
AppleMeasurementUnits = "Centimeters";
AppleMetricUnits = true;
AppleTemperatureUnit = "Celsius";
};
};
home.packages = with pkgs; [
babashka
bottom
btop
bun
cascadia-code
clj-kondo
cloc
cmake
codex-acp
coreutils
curl
fira-code
gnupg
htop
imagemagick
iosevka-comfy.comfy
iosevka-comfy.comfy-motion-duo
jetbrains-mono
jankyborders
jq
kubectl
ledger
mosh
nixd
nixpkgs-fmt
nodejs
typescript-language-server
vscode-json-languageserver
noto-fonts
pass
pinentry_mac
ripgrep
sops
tree
typescript
wget
];
home.stateVersion = "24.11";
home.sessionVariables = {
PAGER = "less";
CLICOLOR = 1;
EDITOR = "emacs";
};
programs = {
direnv = {
enable = true;
enableZshIntegration = true;
nix-direnv.enable = true;
};
fzf = {
enable = true;
enableZshIntegration = true;
};
git = {
enable = true;
signing.format = null;
settings = {
core.editor = "emacsclient -c -a ''";
init.defaultBranch = "main";
pull.rebase = true;
rebase.updateRefs = true;
user.name = "Tobias Ostner";
user.email = email;
};
};
opencode = {
enable = true;
};
pi.coding-agent = {
enable = true;
skills = [
(inputs.agent-skills + "/create-plan")
(inputs.agent-skills + "/create-skill")
];
environment = {
FIRECRAWL_API_KEY.file = config.sops.secrets.firecrawl_api_key.path;
IONOS_PAT.file = config.sops.secrets.ionos_pat.path;
};
settings = {
defaultProvider = "openai-codex";
defaultModel = "gpt-5.6-sol";
defaultThinkingLevel = "high";
packages = [
"npm:pi-web-access@0.15.0"
"npm:pi-mcp-adapter@2.15.0"
"npm:pi-subagents@0.37.2"
{
source = "npm:@aliou/pi-guardrails@0.16.0";
extensions = [ "-extensions/herdr/index.ts" ];
}
];
};
};
starship = {
enable = true;
enableZshIntegration = true;
settings = {
gcloud.disabled = true;
aws.disabled = true;
hostname.style = "bold green";
};
};
zoxide = {
enable = true;
enableZshIntegration = true;
};
zsh = {
enable = true;
enableCompletion = true;
autosuggestion.enable = true;
initContent = builtins.readFile ../config/zsh/zshrc;
syntaxHighlighting.enable = true;
shellAliases = {
ls = "ls --color=auto -F";
emacs = "emacsclient -c -a ''";
};
};
};
services.gpg-agent = {
enable = true;
pinentry.package = pkgs.pinentry_mac;
};
launchd.agents.disable-hotkey = {
enable = true;
config = {
ProgramArguments = [
"defaults"
"write"
"com.apple.symbolichotkeys"
"AppleSymbolicHotKeys"
"-dict-add"
"70"
"<dict><key>enabled</key><false/></dict>"
];
RunAtLoad = true;
};
};
launchd.agents.jankyborders = {
enable = true;
config = {
ProgramArguments = [
"${pkgs.bash}/bin/bash"
"${config.xdg.configHome}/borders/bordersrc"
];
EnvironmentVariables.PATH = "${pkgs.jankyborders}/bin:/usr/bin:/bin";
KeepAlive = true;
RunAtLoad = true;
StandardErrorPath = "${config.home.homeDirectory}/Library/Logs/jankyborders.log";
StandardOutPath = "${config.home.homeDirectory}/Library/Logs/jankyborders.log";
};
};
xdg.configFile."aerospace/aerospace.toml".text = builtins.readFile ../config/aerospace/aerospace.toml;
xdg.configFile."borders/bordersrc".source = ../config/borders/bordersrc;
xdg.configFile.".bunfig.toml".text = builtins.readFile ../config/bun/bunfig.toml;
xdg.configFile."ghostty/config".text = builtins.readFile ../config/ghostty/config;
xdg.configFile."mcp/mcp.json".source = ../config/mcp/mcp.json;
}