1
0
Commit Graph

51 Commits

Author SHA1 Message Date
af6c1ba4e9 home/develop/emacs: add yasnippet snippets and make snippet dirs configurable
This commit makes two significant changes to the Emacs configuration:

1. Refactors emacs.nix to use proper NixOS module structure:
   - Converts from simple configuration to a module with options/config
   - Adds `tb.emacs.extraSnippetDirs` option to allow per-machine snippet
     directories (defaults to ~/.emacs.d/snippets/)
   - Moves yasnippet configuration from custom.el to nix-generated elisp,
     enabling dynamic snippet directory configuration via Nix

2. Adds a comprehensive collection of yasnippet snippets for multiple modes:
   - C++ mode: 50 snippets for common patterns (class, namespace, operators,
     copy/move semantics, debug helpers, documentation, threading primitives)
   - CC mode (shared C/C++): for, switch, main, include guards, etc.
   - CMake mode: if/else, foreach, function, macro, project boilerplate
   - LaTeX mode: document structure, beamer frames, figures, lists
   - Perl mode: package boilerplate, shebang
   - Python/Shell/Nix/Protobuf/Java/CSS/Dockerfile modes: horizontal rules
     and common patterns
   - Text mode: modeline snippets for locale settings

The snippets use yasnippet's inheritance system via .yas-parents files,
so c++-mode inherits from cc-mode and text-mode, reducing duplication.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-08 22:38:37 -08:00
Timo Bingmann
3d098013a9 system/develop: add yaml module for Python3 2025-12-05 18:32:44 -08:00
41febdadfc tb-dev-scripts: add ,video_loop_extractor.py 2025-12-05 10:55:25 -08:00
Timo Bingmann
1000663cb5 also upgrade ebay-mac to 25.11 2025-12-04 12:21:39 -08:00
03b50ccb9f upgrade to 25.11 2025-12-02 17:13:56 -08:00
d28a6049ca home/private: add git base config 2025-12-01 19:26:03 -08:00
78c2a41c55 home/develop/emacs: add go mode 2025-11-23 08:22:16 -08:00
c9269c6644 develop/packages: fix Python3 2025-11-20 22:03:36 -08:00
6416611abe Add custom script packages with Nix dependency management
This commit introduces two new custom script packages: tb-scripts for
all systems and tb-dev-scripts for development machines. These packages
provide a maintainable way to distribute utility scripts across the
infrastructure with proper dependency management.

Created pkgs/ directory with two script collections:

1. **tb-scripts** - General utilities available on all systems:
   - ,jq_reformat: Reformat JSON files in-place with atomic file operations
   - ,rename_lower: Convert filenames to lowercase with validation

2. **tb-dev-scripts** - Development-specific tools:
   - ,cmake_update_fetchcontent: Update CMake FetchContent dependencies

All scripts have been significantly enhanced from their original versions:

- Proper quoting to handle filenames with spaces
- Secure temporary file creation using mktemp
- Atomic file replacement to prevent data loss
- Input validation and comprehensive error handling
- Usage help with -h/--help flag
- Extensive inline comments explaining each section
- Cleanup traps on error

- Complete rewrite in Python for consistency
- Validates files exist before attempting rename
- Checks if target lowercase filename already exists
- Skips files already lowercase (no-op)
- Descriptive error messages for each failure case
- Usage documentation with examples
- Proper exit codes

- Interactive CMake FetchContent dependency updater
- Recursively finds all CMakeLists.txt files via add_subdirectory()
- Queries GitHub API for latest releases/tags
- Compares semantic versions and commit hashes
- Shows available updates in formatted table
- Prompts for confirmation before applying updates
- Atomic file updates with validation

Scripts are packaged using writeShellApplication with proper dependency
injection via runtimeInputs:

- tb-scripts requires: jq, python3
- tb-dev-scripts requires: python3, git

Dependencies are automatically available in PATH when scripts run,
eliminating manual dependency checks.

Created system module files to import the script packages:

- system/default/scripts.nix: Adds tb-scripts to nixosModules.default
- system/develop/scripts.nix: Adds tb-dev-scripts to nixosModules.develop

Updated flake.nix to import these modules in the appropriate contexts.

- Scripts have proper Nix-managed dependencies
- No manual installation or PATH configuration needed
- Easy to extend with additional scripts
- Scripts are validated with shellcheck during build
- Clear separation between all-systems and dev-only utilities
- Comprehensive error handling and user documentation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-19 05:49:51 -08:00
36a2d10cb1 add zenwifi router 2025-11-15 23:59:17 -08:00
0c5a54499d Add homeManagerModules.claude for Claude Code configuration management
This commit introduces a new home-manager module that provides declarative
configuration management for Claude Code, Anthropic's official CLI tool. The
module follows the established pattern used by other home-manager modules in
this flake (default, private, macos, develop) and enables users to deploy
custom Claude Code slash commands and configuration files to ~/.claude/.

Changes included:

1. Created home/claude/config.nix module:
   - Defines a new home-manager module for Claude Code configuration
   - Uses home.file to deploy command files from the Nix store to ~/.claude/
   - Currently deploys two custom slash commands to ~/.claude/commands/

2. Added two custom slash commands:
   - commit.md: Automates git commit creation by reading staged diffs and
     generating comprehensive commit messages
   - go-plan.md: Writes detailed implementation plans to PLAN.md before
     starting work, supporting the planning workflow

3. Registered homeManagerModules.claude in flake.nix:
   - Added as a new, independent module group that can be imported separately
   - Positioned after the develop module for logical organization
   - Can be enabled by importing inputs.nix-shared.homeManagerModules.claude

4. Enhanced flake.nix documentation:
   - Added descriptive comments for all nixosModules and homeManagerModules
   - Clarifies the purpose of each module group (e.g., "Linux specific system
     configuration", "Add private homelab and cloud host aliases")
   - Improves maintainability and makes the flake structure self-documenting

The module structure supports easy extension - additional slash commands or
configuration files can be added by placing them in home/claude/config/ and
adding corresponding home.file entries in config.nix.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-13 23:29:04 -08:00
Timo Bingmann
192f09e86f packages: don't get clang 2025-11-10 10:29:28 -08:00
7f1f44174a enable forwardAgent for private hosts 2025-11-06 08:28:22 -08:00
78a52810d0 rename wg1 to tr1 at home 2025-11-05 18:57:59 -08:00
0de3ffd6b3 create homeManagerModules.private for ssh hosts 2025-11-04 22:34:57 -08:00
b0a0d1efcd linux: add openssh and tb user account 2025-11-04 18:50:32 -08:00
Timo Bingmann
e823d9af7a macos: Disable click on desktop action. 2025-09-24 09:08:56 -07:00
Timo Bingmann
dbd6913638 macos: add Terminal settings 2025-09-22 15:03:06 -07:00
Timo Bingmann
6a20426279 macos/hotkeys: add mission control left/right 2025-09-22 10:13:47 -07:00
ccdfedeaed develop/packages: add gnupg 2025-09-22 09:59:59 -07:00
1a5009f4af add system/linux/i18n.nix 2025-09-22 08:46:06 -07:00
abe5a405d0 add ssh-authorized-keys.nix for all hosts 2025-09-21 21:13:57 -07:00
ba45fb66ab add more development packages 2025-09-21 19:47:25 -07:00
05d4fd7ed2 create home/macos/home.nix 2025-09-21 19:15:01 -07:00
b699896f68 add nixosModules.develop containing packages 2025-09-21 18:52:49 -07:00
a204bbcf72 macos: set up symbol hotkeys 2025-09-21 18:04:38 -07:00
d93557d7bf macos: add yabai window manager 2025-09-21 16:03:27 -07:00
84ec7b5318 add nix settings and dir colors for MacOS 2025-09-21 15:49:19 -07:00
91a1aa83f7 macos/system: add shells 2025-09-21 09:20:39 -07:00
86e02b4e3b default/packages: add more global packages (missing on MacOS) 2025-09-21 09:10:24 -07:00
32df76566c macos/system.nix: use primaryUser 2025-09-21 08:52:46 -07:00
cf21b98a9d packages: add tree package everywhere 2025-09-20 10:38:02 -07:00
f36c140300 Disable core dumps via pam 2025-09-19 22:33:29 -07:00
9f57a00ffe system/default: add prompt.nix for prompt coloring 2025-09-19 22:17:53 -07:00
6cc3a633e6 enable formatter 2025-09-19 22:17:25 -07:00
6d64e1f074 emacs: Skip package.el entirely when using Nix 2025-08-20 05:48:07 -07:00
cb5ddb15a6 emacs: switch to ethan-wspace 2025-08-20 05:47:55 -07:00
2cbaea2554 emacs: allow spaces in TERMINAL 2025-08-19 12:46:36 -07:00
a72d9d5886 macos: add cascadia-code 2025-08-14 14:44:51 -07:00
93288e9bcc emacs: enable typescript-ts-mode 2025-08-13 20:04:13 -07:00
d44a684fbb create tb-shared.nixosModules.macos 2025-08-11 08:25:02 -07:00
81ce015274 set whitespace-cleanup-mode-only-if-initially-clean to nil 2025-07-29 12:19:37 -07:00
40c227658b fix tramp issues with direnv 2025-07-23 10:22:52 -07:00
ef906fc107 rg directory ask 2025-07-13 13:38:48 -07:00
36a580d62f fix grep 2025-07-12 12:26:03 -07:00
95b645b1f0 projectile-find-other-file 2025-07-12 06:16:59 -07:00
37ffbb1402 emacs: use TERMINAL environment variable 2025-07-09 17:56:57 -07:00
ee9aa036e2 improve emacs 2025-07-08 19:43:00 -07:00
11332b71e2 add emacs config 2025-07-08 14:12:51 -07:00
87929055af Extract settings for Darwin 2025-06-25 23:42:33 -07:00