aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/darwin/homebrew.nix5
-rw-r--r--modules/home/claude.nix60
-rw-r--r--modules/home/default.nix3
-rw-r--r--modules/home/zsh.nix16
-rw-r--r--modules/nixos/default.nix5
5 files changed, 67 insertions, 22 deletions
diff --git a/modules/darwin/homebrew.nix b/modules/darwin/homebrew.nix
index ef275d7..38ef124 100644
--- a/modules/darwin/homebrew.nix
+++ b/modules/darwin/homebrew.nix
@@ -17,6 +17,8 @@
"tursodatabase/tap"
"simenandre/tools"
"dinacomputer/tap"
+ "anomalyco/tap"
+ "siderolabs/tap"
];
brews = [
@@ -51,7 +53,6 @@
"pigz"
# Programming languages and runtimes
- "golang"
"golangci-lint"
"rust"
"zig"
@@ -123,6 +124,7 @@
"gh"
"htop"
"opencode"
+ "pre-commit"
# HTTP and web servers
"caddy"
@@ -180,7 +182,6 @@
masApps = {
"Tailscale" = 1475387142;
"Jojo" = 1659864300;
- "reMarkable" = 1276493162;
};
};
}
diff --git a/modules/home/claude.nix b/modules/home/claude.nix
new file mode 100644
index 0000000..fd73963
--- /dev/null
+++ b/modules/home/claude.nix
@@ -0,0 +1,60 @@
+{ ... }:
+
+{
+ home.file.".claude/skills/push/SKILL.md".text = ''
+ ---
+ name: push
+ description: Create a commit and push changes. Optionally creates a branch and opens a PR with an intelligently chosen reviewer.
+ disable-model-invocation: true
+ ---
+
+ # /push — Commit & Push Workflow
+
+ You are executing the /push skill. Follow these steps precisely.
+
+ ## Step 1: Analyze Changes
+
+ Run `git status` and `git diff` (staged + unstaged) to understand all current changes.
+ If there are no changes to commit, inform the user and stop.
+
+ ## Step 2: Stage Files
+
+ Stage the relevant files. Prefer `git add <specific files>` over `git add -A`.
+ Never stage files that look like secrets (.env, credentials, tokens).
+
+ ## Step 3: Create Commit
+
+ - Analyze the staged diff and recent `git log --oneline -10` to match the repo's commit style.
+ - Write a concise, meaningful commit message (1-2 sentences) focusing on the "why".
+ - **Do NOT add a Co-Authored-By line. Never include any co-author trailer.**
+ - Create the commit using a HEREDOC for the message.
+
+ ## Step 4: Ask — Branch or Main?
+
+ Ask the user:
+
+ > Push directly to the current branch, or create a new branch and open a PR?
+
+ Present the two options clearly and wait for a response.
+
+ ### Option A: Push to current branch
+
+ - Run `git push` (with `-u` if needed).
+ - Done.
+
+ ### Option B: New branch + PR
+
+ 1. Create a descriptive branch name based on the changes (e.g., `feat/add-logging`, `fix/null-check-user`).
+ 2. Check out the new branch and push with `-u`.
+ 3. **Choose a reviewer:**
+ - Run `git log --format='%an' -50 | sort | uniq -c | sort -rn | head -10` to find active contributors.
+ - Cross-reference with files changed: run `git log --format='%an' -- <changed-files> | sort | uniq -c | sort -rn | head -5` to find who has context on the modified code.
+ - Pick the most relevant reviewer (not the current user — check with `git config user.name`).
+ - Present your choice to the user and ask for confirmation before proceeding.
+ 4. Create the PR using `gh pr create`:
+ - Short title (under 70 chars).
+ - Body with a `## Summary` section (2-3 bullet points) and a `## Test plan` section.
+ - Add the confirmed reviewer with `--reviewer`.
+ 5. Return the PR URL to the user.
+ '';
+}
diff --git a/modules/home/default.nix b/modules/home/default.nix
index 92dc9f3..13d72b8 100644
--- a/modules/home/default.nix
+++ b/modules/home/default.nix
@@ -2,6 +2,7 @@
{
imports = [
+ ./claude.nix
./git.nix
./ghostty.nix
./starship.nix
@@ -42,6 +43,8 @@
yq
];
+ programs.go.enable = true;
+
# Let home-manager manage itself
programs.home-manager.enable = true;
}
diff --git a/modules/home/zsh.nix b/modules/home/zsh.nix
index d2f56f3..3154e8a 100644
--- a/modules/home/zsh.nix
+++ b/modules/home/zsh.nix
@@ -1,12 +1,6 @@
{ pkgs, ... }:
let
- znap = pkgs.fetchFromGitHub {
- owner = "marlonrichert";
- repo = "zsh-snap";
- rev = "main";
- hash = "sha256-wNxNraqlY3Uy4RTUl/2IwJqfUDz/mqILq5QPNrWZxi8=";
- };
zsh-autocomplete = pkgs.fetchFromGitHub {
owner = "marlonrichert";
repo = "zsh-autocomplete";
@@ -28,7 +22,6 @@ let
in
{
home.file = {
- ".zsh_repos/znap".source = znap;
".zsh_repos/marlonrichert/zsh-autocomplete".source = zsh-autocomplete;
".zsh_repos/zsh-users/zsh-autosuggestions".source = zsh-autosuggestions;
".zsh_repos/jeffreytse/zsh-vi-mode".source = zsh-vi-mode;
@@ -71,11 +64,7 @@ in
# https://github.com/koalaman/shellcheck/issues/809
# shellcheck disable=SC1090 # sourced filenames with variables
- zstyle ':znap:*' repos-dir ~/.zsh_repos
- source ~/.zsh_repos/znap/znap.zsh # Start Znap
-
- znap eval starship 'starship init zsh --print-full-init'
- znap prompt
+ eval "$(starship init zsh)"
source ~/.zsh_repos/marlonrichert/zsh-autocomplete/zsh-autocomplete.plugin.zsh
source ~/.zsh_repos/zsh-users/zsh-autosuggestions/zsh-autosuggestions.plugin.zsh
@@ -140,10 +129,7 @@ in
fi
}
- GOPATH="$HOME/go"
-
add_to_path "$HOME/.volta/bin"
- add_to_path "$GOPATH/bin"
add_to_path "/Library/Frameworks/Firebird.framework/Resources/bin"
add_to_path "/opt/homebrew/opt/libpq/bin"
'';
diff --git a/modules/nixos/default.nix b/modules/nixos/default.nix
index d4edd66..6b59949 100644
--- a/modules/nixos/default.nix
+++ b/modules/nixos/default.nix
@@ -33,11 +33,6 @@
};
programs.zsh.enable = true;
- programs.go.enable = true;
-
- home.sessionPath = [ "${config.programs.go.env.GOPATH}/bin" ];
-
-
# Core system packages
environment.systemPackages = with pkgs; [