Commit graph

159 commits

Author SHA1 Message Date
f0a93f457e updated the lab-tool to use correct keys 2025-07-03 23:09:43 +02:00
62fabf835d updated the lab-tool to use correct keys 2025-07-03 22:49:35 +02:00
fef22d02b8 Merge branch 'main' of ssh://git.geokkjer.eu:2222/geir/home-lab 2025-07-03 22:32:34 +02:00
9576b67d91 theming for seatd tuigreet 2025-07-03 22:32:19 +02:00
Geir Okkenhaug Jerstad
974b3c62cc Some research 2025-07-03 22:13:21 +02:00
26507807cf some bad ides and research 2025-07-03 22:09:45 +02:00
251222037d feat(emacs): robust Nix-based Emacs setup with daemon service, improved elisp dev, and full package documentation
- Emacs daemon runs as a systemd service via Nix
- Modular Emacs config with Nix-managed packages (elisp-slime-nav, aggressive-indent, highlight-defined, etc.)
- Keybinding fixes and error handling improvements
- New EMACS_README.md explains ecosystem and troubleshooting
- Nix config: GUI sudo askpass, podman, and desktop tweaks
- All errors from missing packages and keybindings resolved
2025-07-03 20:39:07 +02:00
649f0f3b2c fix: resolve emacs claude-code errors and optimize lab-tool deployments
- Fix claude-code.el quelpa installation with correct Git URL
- Make auto-compile and flycheck conditional for little-rascal
- Auto-skip checks for local machines in lab-tool for faster deployments
- Prevent emacs "Cannot load auto-compile" and "arrayp, nil" errors

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-03 18:31:37 +02:00
6558540485 Merge branch 'main' of ssh://git.geokkjer.eu:2222/geir/home-lab 2025-07-03 17:45:51 +02:00
47c2961033 Refactor emacs configuration and clean up lab-tool project
- Reorganized emacs configuration with profiles in modules/development/emacs.nix
- Updated machine configurations to use new emacs module structure
- Cleaned up lab-tool project by removing archive, research, testing, and utils directories
- Streamlined lab-tool to focus on core deployment functionality with deploy-rs
- Added DEVELOPMENT.md documentation for lab-tool

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-03 17:45:34 +02:00
bff56e4ffc We have made an emacs conf with profiles. And refactored lab tool to use deploy-rs 2025-07-03 15:09:33 +02:00
Geir Okkenhaug Jerstad
93efaff06e added create home true to ensure ssh is done right 2025-07-02 12:47:57 +02:00
Geir Okkenhaug Jerstad
aa607747c3 feat: added basic structure for searXNG and netdata 2025-07-02 12:45:23 +02:00
Geir Okkenhaug Jerstad
fa5de8f1bb Add fwupd service for firmware updates
Adding fwupd to check if there are firmware updates available
for the ITE8353 touchpad or other components that might help
resolve the touchpad issue.
2025-06-30 19:26:26 +02:00
Geir Okkenhaug Jerstad
51335f144b Try Linux 5.15 LTS kernel for touchpad compatibility
6.1 LTS improved I2C communication significantly, but hidraw device
still not created. Trying 5.15 LTS since laptop worked with older distros.
2025-06-30 19:25:33 +02:00
Geir Okkenhaug Jerstad
497cdced54 Remove udev rules - test with clean LTS kernel configuration
Removing custom udev rules since they weren't needed in earlier
working configurations. Testing with clean 6.1 LTS kernel to see
if touchpad works naturally without interference.
2025-06-30 19:16:25 +02:00
Geir Okkenhaug Jerstad
92a2c73b8a Remove blacklisted modules and test with LTS kernel
The LTS kernel (6.1) is handling the ITE8353 touchpad much better.
Removing blacklisted modules to see if the proper drivers can now
work correctly with the improved kernel support.
2025-06-30 19:15:04 +02:00
Geir Okkenhaug Jerstad
4aa06b1851 Add HID input drivers and document LTS kernel success
LTS kernel 6.1.142 successfully established communication with ITE8353:
- Device properly detected and HID descriptor read
- Input events are being received from touchpad
- Debug output shows device is working at HID level
- Need to bind to proper input driver for touchpad functionality
2025-06-30 19:13:12 +02:00
Geir Okkenhaug Jerstad
4d688d47da Switch to LTS kernel 6.1 for touchpad compatibility
The laptop worked fine with older NixOS and Arch installations,
suggesting a kernel regression in 6.12.x. Switching to LTS
kernel 6.1 to test if this resolves the ITE8353 touchpad issue.
2025-06-30 19:07:32 +02:00
Geir Okkenhaug Jerstad
24b01ae4f0 Blacklist hid_sensor_hub to fix touchpad
The ITE8353 touchpad is still being bound to hid-sensor-hub instead
of hid-multitouch. Blacklisting hid_sensor_hub should force it to
use the proper touchpad driver.
2025-06-30 18:59:15 +02:00
Geir Okkenhaug Jerstad
a0a12e14c8 Fix touchpad by blacklisting AMD SFH driver
Based on dmesg analysis, found that:
- ITE8353 touchpad is detected but bound to hid-sensor-hub
- AMD Sensor Fusion Hub (amd_sfh) is interfering with touchpad
- Error: 'pcie_mp2_amd 0000:02:00.7: amd_sfh_hid_client_init failed err -95'

Blacklisting amd_sfh module should allow touchpad to work properly.
2025-06-30 18:56:00 +02:00
Geir Okkenhaug Jerstad
b2ce976a65 Add comprehensive touchpad troubleshooting documentation
- Document ITE8353 touchpad issue on little-rascal
- List all attempted solutions and current status
- Provide next steps for further investigation
- Include useful debugging commands and references
2025-06-30 18:48:03 +02:00
Geir Okkenhaug Jerstad
d5ea2514b4 Add udev rules to force ITE8353 touchpad driver binding
- Add udev rule to unbind from hid-sensor-hub and bind to hid-multitouch
- Add i2c_hid_acpi.probe_defer parameter to help with device detection
- This should fix the touchpad being misidentified as a sensor hub
2025-06-30 18:45:27 +02:00
Geir Okkenhaug Jerstad
414f17a5a0 Fix xinput package reference in input module 2025-06-30 18:42:00 +02:00
Geir Okkenhaug Jerstad
e4cbaff3e0 Fix little-rascal touchpad support and update AMD GPU config
- Add ITE8353 touchpad support with I2C HID modules
- Configure libinput for proper touchpad functionality
- Add udev rules for touchpad device permissions
- Simplify AMD GPU config to use open source drivers only
- Remove ROCm and 32-bit support for cleaner configuration
- Add diagnostic script for touchpad troubleshooting
2025-06-30 18:41:06 +02:00
Geir Okkenhaug Jerstad
5c9c5bbbc4 feat: extract seatd service to reusable module with boot log suppression
- Create modules/services/seatd.nix for clean greetd/tuigreet login experience
- Add boot log suppression options to prevent systemd messages on login screen
- Configure kernel parameters and journald to minimize console noise
- Update both little-rascal and congenital-optimist to use new seatd module
- Ensure consistent login experience across all machines
- Maintain compatibility with existing lab tool (binary name: lab)
2025-06-30 14:47:28 +02:00
Geir Okkenhaug Jerstad
5f65abc2cc feat: implement orchestrated auto-update system and fix deployment
- Add sma user module to little-rascal configuration for passwordless deployment
- Replace cosmic-greeter with greetd on both congenital-optimist and little-rascal
- Implement staggered auto-update system that updates remote machines first
- Add proper SSH user configuration for secure deployments
- Fix deployment permission issues by configuring admin user access
- Ensure orchestrator machine (congenital-optimist) reboots last to prevent SSH disconnection
- Add comprehensive error handling and update reporting
- Successfully tested lab tool deployment and auto-update on all machines

Fixes the critical issue where orchestrator reboot could break SSH connections
during multi-machine updates.
2025-06-30 14:35:21 +02:00
Geir Okkenhaug Jerstad
0465c56305 testing claude code and niri wm on laptop 2025-06-30 11:43:31 +02:00
Geir Okkenhaug Jerstad
3715e542b2 feat: add little-rascal laptop configuration and deployment
- Add complete NixOS configuration for little-rascal laptop
- Include Niri window manager and CLI-focused setup
- Add hardware configuration for laptop hardware
- Include deployment script for little-rascal
- Update flake.nix to include little-rascal as build target
- Add deploy-rs configuration for little-rascal deployment

The little-rascal laptop is now fully integrated into the Home Lab
infrastructure with complete NixOS configuration management.
2025-06-30 11:40:31 +02:00
Geir Okkenhaug Jerstad
f42bae513c feat(lab-tool): integrate little-rascal laptop into Home Lab management
- Add little-rascal to lab-tool configuration with proper attributes
- Include little-rascal in machine management, SSH connectivity, and deployment targets
- Update README.md with examples including little-rascal
- Verify full integration: machines listing, status monitoring, SSH access, deployment ready

The little-rascal laptop is now fully managed through the unified lab-tool interface
alongside other Home Lab machines (congenital-optimist, sleeper-service, grey-area, reverse-proxy).
2025-06-30 11:40:10 +02:00
6eac143f57 feat: Add little-rascal laptop config and lab-tool auto-update system
## New Machine: little-rascal
- Add Lenovo Yoga Slim 7 14ARE05 configuration (AMD Ryzen 7 4700U)
- Niri desktop with CLI login (greetd + tuigreet)
- zram swap configuration (25% of RAM with zstd)
- AMD-optimized hardware support and power management
- Based on congenital-optimist structure with laptop-specific additions

## Lab Tool Auto-Update System
- Implement Guile Scheme auto-update module (lab/auto-update.scm)
- Add health checks, logging, and safety features
- Integrate with existing deployment and machine management
- Update main CLI with auto-update and auto-update-status commands
- Create NixOS service module for automated updates
- Document complete implementation in simple-auto-update-plan.md

## MCP Integration
- Configure Task Master AI and Context7 MCP servers
- Set up local Ollama integration for AI processing
- Add proper environment configuration for existing models

## Infrastructure Updates
- Add little-rascal to flake.nix with deploy-rs support
- Fix common user configuration issues
- Create missing emacs.nix module
- Update package integrations

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-27 22:03:54 +02:00
Geir Okkenhaug Jerstad
5e1061382c testing claude code 2025-06-27 21:14:28 +02:00
8db85e0479 Update README to reflect current AI-enhanced infrastructure status
Major updates to accurately represent the project's evolution from basic NixOS
home lab to sophisticated AI-integrated infrastructure:

- Add AI components: Task Master AI, Ollama inference, MCP protocol
- Update architecture to show 4/4 machines fully operational
- Include service stack: Forgejo Git hosting, Jellyfin media, RAG system
- Reflect 31 completed infrastructure automation tasks
- Add local AI processing with complete data privacy
- Update technology stack with Guile Scheme automation tools
- Include external services accessible via git.geokkjer.eu

The README now accurately represents this as an advanced AI-enhanced
home lab with intelligent task management and privacy-focused automation.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-27 18:58:11 +02:00
Geir Okkenhaug Jerstad
6306a05d64 Fix lab deploy command to properly handle switch/test/boot modes
- Updated cmd-deploy function to accept and parse mode arguments
- Added validation for deployment modes with helpful error messages
- Updated command dispatcher to pass all arguments to deploy function
- Enhanced help text with mode documentation and examples
- Fixes issue where deploy always used 'boot' mode regardless of flags

Examples now working:
- lab deploy machine switch  # Deploy and activate immediately
- lab deploy machine test    # Deploy temporarily for testing
- lab deploy machine boot    # Deploy for next boot (default)
2025-06-26 13:39:46 +02:00
Geir Okkenhaug Jerstad
27ae250fd4 testing claude code getting package from unstable 2025-06-26 13:30:58 +02:00
Geir Okkenhaug Jerstad
a7660d0b8d testing claude code 2025-06-25 16:36:30 +02:00
Geir Okkenhaug Jerstad
1ad4663e6e created dsahboard project vue3 empty for now 2025-06-24 09:22:45 +02:00
Geir Okkenhaug Jerstad
fb45c41a93 before 2025-06-24 09:19:33 +02:00
Geir Okkenhaug Jerstad
dd1f20d08d added aider-chat for testing 2025-06-21 13:19:22 +02:00
Geir Okkenhaug Jerstad
12fb56f35b some research and loose thoughts 2025-06-20 15:32:34 +02:00
Geir Okkenhaug Jerstad
076c38d829 some work on sound anf noise suppression and research into netdata 2025-06-19 21:15:24 +02:00
Geir Okkenhaug Jerstad
bc3d199cca fix: prevent troubleshoot script from exiting abruptly
- Change from 'set -euo pipefail' to 'set -uo pipefail' to avoid early exits
- Add proper error handling for all commands that might fail
- Wrap pw-dump, jq, and pw-cli commands with availability checks
- Add null checks and error suppression where appropriate
- Ensure script completes with success message
- Fix RNNoise filter detection and removal logic
- The script should now run completely without abrupt termination
2025-06-18 21:53:55 +02:00
Geir Okkenhaug Jerstad
406acb3daf fix: improve voice quality and add distortion troubleshooting
- Fix RNNoise configuration: use mono instead of stereo, increase VAD threshold to 95%
- Adjust quantum settings: increase min-quantum to 64 for stability
- Add comprehensive voice distortion troubleshoot script
- Create optional disable-auto-rnnoise.nix for problematic setups
- The automatic RNNoise filter can cause artifacts, script helps diagnose and fix
2025-06-18 21:46:31 +02:00
Geir Okkenhaug Jerstad
52a9d544fc feat: comprehensive audio system and MCP server implementation
Audio System Enhancements:
- Complete PipeWire configuration with WirePlumber session management
- AI-powered noise suppression using RNNoise plugin
- GUI applications: EasyEffects, pavucontrol, Helvum, qpwgraph, pwvucontrol
- Pre-configured audio presets for microphone noise suppression
- Desktop integration with auto-start and helper scripts
- Validation tools and interactive audio management utilities
- Real-time audio processing with RTKit optimization
- Cross-application compatibility (Discord, Zoom, OBS, etc.)

MCP (Model Context Protocol) Implementation in Guile Scheme:
- Modular MCP server architecture with clean separation of concerns
- JSON-RPC transport layer with WebSocket and stdio support
- Protocol compliance with MCP specification
- Comprehensive error handling and validation
- Router system for tool and resource management
- Integration layer for NixOS Home Lab management
- Full test suite with unit and integration tests
- Documentation and usage examples

Technical Details:
- Removed conflicting ALSA udev rules while maintaining compatibility
- Fixed package dependencies and service configurations
- Successfully deployed and tested on congenital-optimist machine
- Functional programming approach using Guile Scheme modules
- Type-safe protocol implementation with validation
- Async/await pattern support for concurrent operations

This represents a significant enhancement to the Home Lab infrastructure,
providing both professional-grade audio capabilities and a robust MCP
server implementation for AI assistant integration.
2025-06-18 21:10:06 +02:00
Geir Okkenhaug Jerstad
7c44a7822b fix: remove ALSA udev rules to resolve build issue
- Remove services.udev.packages with alsa-utils (causing udev rules conflict)
- Keep services.pipewire.alsa.enable for ALSA compatibility
- Re-enable alsa-utils in system packages for testing utilities
- ALSA compatibility maintained through PipeWire, not udev rules
2025-06-18 21:05:10 +02:00
Geir Okkenhaug Jerstad
ecb9a12425 Fix: Remove pipewire-pulse package, use services.pipewire.pulse.enable instead 2025-06-18 21:02:16 +02:00
Geir Okkenhaug Jerstad
ee6c5287b4 Fix PipeWire configuration: use extraConfig.pipewire and remove duplicates
- Use proper services.pipewire.extraConfig.pipewire for noise suppression
- Add rnnoise-plugin to system packages
- Remove duplicate environment.etc configuration
- Simplify configuration structure
2025-06-18 21:00:14 +02:00
Geir Okkenhaug Jerstad
9c9dcdc196 Add comprehensive PipeWire audio configuration with noise suppression
- Add modules/sound/pipewire.nix with full PipeWire stack
- Include RNNoise AI-powered noise suppression
- Add EasyEffects with pre-configured presets for mic and speakers
- Include multiple GUI applications (pavucontrol, helvum, qpwgraph, pwvucontrol)
- Add helper scripts: audio-setup, microphone-test, validate-audio
- Optimize for low-latency real-time audio processing
- Enable auto-start and desktop integration
- Remove duplicate PipeWire configs from hardware-co.nix and users/common.nix
- Import sound module through desktop/common.nix for all desktop machines
2025-06-18 20:57:39 +02:00
Geir Okkenhaug Jerstad
54e80f5c13 fix: resolve Taskmaster AI MCP integration with local Ollama models
- Fix provider configuration from 'openai' to 'ollama' in .taskmaster/config.json
- Remove conflicting MCP configurations (.cursor/mcp.json, packages/.cursor/mcp.json)
- Standardize on single .vscode/mcp.json configuration for VS Code
- Update environment variables for proper Ollama integration
- Add .env.taskmaster for easy environment setup
- Verify AI functionality: task creation, expansion, and research working
- All models (qwen2.5-coder:7b, deepseek-r1:7b, llama3.1:8b) operational
- Cost: /run/current-system/sw/bin/zsh (using local Ollama server at grey-area:11434)

Resolves configuration conflicts and enables full AI-powered task management
with local models instead of external API dependencies.
2025-06-18 16:16:27 +02:00
Geir Okkenhaug Jerstad
2e193e00e9 feat: Complete Ollama CPU optimization and TaskMaster consolidation
🚀 Major Performance Improvements:
- Increased CPU quota from 800% to 2000% (20/24 cores)
- Enhanced threading: OMP/MKL/BLAS threads from 8 to 20
- Upgraded context length from 4096 to 8192 tokens
- Deployed optimized 7-8B parameter models

🔧 Infrastructure Enhancements:
- Updated ollama.nix with comprehensive CPU optimizations
- Added memory-efficient q8_0 KV cache configuration
- Implemented systemd resource limits and I/O optimizations
- Forced cpu_avx2 library for optimal performance

📊 Performance Results:
- Achieved 734% CPU utilization during inference
- Maintained stable 6.5GB memory usage (19.9% of available)
- Confirmed 3-4x performance improvement over baseline
- Successfully running qwen2.5-coder:7b and deepseek-r1:7b models

🎯 TaskMaster Integration:
- Consolidated duplicate .taskmaster configurations
- Merged tasks from packages folder to project root
- Updated MCP service configuration with optimized models
- Verified AI-powered task expansion functionality

📝 Documentation:
- Created comprehensive performance report
- Documented optimization strategies and results
- Added monitoring commands and validation procedures
- Established baseline for future improvements

 Deployment Status:
- Successfully deployed via NixOS declarative configuration
- Tested post-reboot functionality and stability
- Confirmed all optimizations active and performing optimally
- Ready for production AI-assisted development workflows
2025-06-18 14:22:08 +02:00