chore: improve code formatting and configuration across multiple files
CI / Flake check (aarch64-linux) (push) Failing after 17m27s
CI / Flake check (x86_64-linux) (push) Failing after 53m5s
CI / Pre-commit checks (x86_64-linux) (push) Successful in 11s

The diff shows comprehensive code cleanup and formatting improvements across 18 files, including cleaner argument structures, additional package configurations, and improved formatting in the `home/terminal/software/git.nix` hook script.
This commit is contained in:
2026-07-20 06:50:52 +02:00
parent 4ee5658053
commit 62c70dab19
18 changed files with 272 additions and 182 deletions
+22 -22
View File
@@ -10,34 +10,34 @@
# Hook that auto-generates a Conventional Commit message from staged diff
prepareCommitMsg = pkgs.writeShellScript "prepare-commit-msg" ''
# Only run if there are staged changes
if git diff --cached --quiet 2>/dev/null; then
exit 0
fi
# Only run if there are staged changes
if git diff --cached --quiet 2>/dev/null; then
exit 0
fi
echo "Generating commit message from staged changes..." >&2
echo "Generating commit message from staged changes..." >&2
# Generate Conventional Commit message using opencode run
git diff --cached | timeout 30 ${pkgs.opencode}/bin/opencode run \
-m opencode/north-mini-code-free \
"You are an expert software engineer writing professional Git commit messages.
# Generate Conventional Commit message using opencode run
git diff --cached | timeout 30 ${pkgs.opencode}/bin/opencode run \
-m opencode/north-mini-code-free \
"You are an expert software engineer writing professional Git commit messages.
Create a clean Conventional Commit for the provided diff.
Create a clean Conventional Commit for the provided diff.
Rules:
- Format: type(optional scope): imperative description
- Allowed types: feat, fix, docs, style, refactor, perf, test, build, ci, chore
- First line: maximum 72 characters, starts with capital letter, imperative present tense
- If relevant, add a blank line followed by a short body explaining the motivation and key changes
- Be concise and professional. No emojis, no markdown.
Rules:
- Format: type(optional scope): imperative description
- Allowed types: feat, fix, docs, style, refactor, perf, test, build, ci, chore
- First line: maximum 72 characters, starts with capital letter, imperative present tense
- If relevant, add a blank line followed by a short body explaining the motivation and key changes
- Be concise and professional. No emojis, no markdown.
Output ONLY the commit message. Do not add any extra text, quotes, or explanations." \
2>/dev/null > "$1"
Output ONLY the commit message. Do not add any extra text, quotes, or explanations." \
2>/dev/null > "$1"
# Fallback if generation failed or timed out
if [ ! -s "$1" ]; then
echo "chore: auto-generated commit message" > "$1"
fi
# Fallback if generation failed or timed out
if [ ! -s "$1" ]; then
echo "chore: auto-generated commit message" > "$1"
fi
'';
in {
users.users.someone.packages = with pkgs; [