Commit graph

819 commits

Author SHA1 Message Date
f24a7476a7
feat(viridian): add explicit persist data to backup strategy
Add critical system state from persist.nix to borgbackup jobs:
- SSH host keys (required for borg authentication)
- machine-id and nixos state
- Network and bluetooth configurations

Paths mirror persist.nix configuration for maintainability.
Service-specific persist data (traefik, crowdsec) excluded -
will create dedicated subvolumes if/when needed.
2025-10-07 17:06:45 +08:00
7833d89d86
fix(viridian): resolve backup system initialization issues
Fix snapper and borgbackup jobs to work with ephemeral-btrfs setup:

Snapper fixes:
- Remove global /.snapshots mount (use nested subvolumes instead)
- Remove unused hostname variable
- Snapshots now stored in .snapshots subvolumes within each service

Borgbackup fixes:
- Add systemd.tmpfiles.rules to create staging directories at boot
- Add readWritePaths for staging directories (systemd sandboxing)
- Staging directories survive ephemeral root wipes

Architecture notes:
- Nested .snapshots subvolumes don't require separate mounts
- systemd tmpfiles ensures directories exist before services start
- ProtectSystem=strict requires explicit ReadWritePaths allowlist
2025-10-07 09:38:07 +08:00
c05598d9e0
feat(viridian): implement comprehensive 3-2-1 backup strategy
Add automated snapshot and backup system with three independent tiers:

Snapper (hourly local snapshots):
- Configure snapper for all srv-* subvolumes
- Tiered retention: 24 hourly, 7 daily, 4 weekly, 12 monthly
- Snapshots stored at /.snapshots on viridian drive
- Provides fast operational rollback for user errors

Borgbackup onsite (hourly local backups):
- Independent staging snapshots at /.staging-onsite
- Repository on data drive at /srv/borg-repo
- Unencrypted (physical security assumed)
- Matches snapper retention policy
- Fast local disaster recovery

Borgbackup offsite (daily remote backups):
- Independent staging snapshots at /.staging-offsite
- Encrypted backups to borgbase repository
- Retention: 7 daily, 4 weekly, 12 monthly
- Remote disaster recovery with prune policy

Architecture decisions:
- Separate staging directories prevent job conflicts
- Staging snapshots decouple borg jobs from snapper
- Consistent zstd,9 compression across both borg jobs
- Special case handling for containers subvolume path
2025-10-06 20:59:26 +08:00
b0bfb37d3c
refactor(viridian): migrate service data to dedicated BTRFS subvolumes
Migrate from path-based persistence (/persist/var/lib/*) to dedicated
BTRFS subvolumes for better data isolation and snapshot capabilities.

- Move valuable user-facing services to /srv/* with srv-* subvolumes:
  - forgejo: git repositories and database
  - opengist: paste data
  - minecraft: game world data
  - lighttpd: static web content
  - containers: OCI container volumes

- Update home directory to use hm-sajenim subvolume on viridian disk
- Remove jupyterhub service (no longer in use)
- Update borgbackup paths to match new service locations
- Follow upstream service defaults where possible for maintainability

Services kept on /persist (disposable state):
- traefik, crowdsec, murmur
2025-10-06 13:07:46 +08:00
28ba8186bb
refactor(global): reorganize system packages by category
Restructured systemPackages list with alphabetically sorted categories to improve
maintainability and reduce vertical space. Added descriptive comments for all
environment configuration sections.
2025-10-05 22:37:48 +08:00
bc4321a3cc
refactor(desktop): remove discord import
Remove discord from desktop feature imports.
2025-10-05 16:45:25 +08:00
dda958a8fd
chore: update flake inputs
Updates agenix-rekey, claude-code-nix, nix-jetbrains-plugins,
and nixpkgs (stable/unstable) to latest versions.
2025-10-05 16:42:05 +08:00
341d8ecf45
docs: add explanatory comments to global configurations
Add comprehensive inline documentation to both NixOS and Home Manager
global configuration files, explaining the purpose of each section,
overlay usage, unfree package policy, and configuration settings.
2025-10-05 16:40:48 +08:00
94221dbb56
chore: update flake inputs
Update xmonad-config to latest revision (48) which includes resize functionality and directional window management improvements.
2025-10-05 10:57:00 +08:00
ee7141e74e
refactor(wezterm): remove unused pane rotation keybinds
Remove PageUp/PageDown pane rotation keybinds that don't align with wezterm workflow. The static pane layout approach (fixed splits + zoom toggle) doesn't benefit from rotation like dynamic window managers do.

Also update CLAUDE.md to clarify that Home Manager is a NixOS module, so just build/switch commands handle both system and user configurations together.
2025-10-05 10:53:54 +08:00
2e0a288a1a
Revert "chore: remove .mcp.json to enable on-demand only"
This reverts commit a0508da175.
2025-10-04 16:17:35 +08:00
a0508da175
chore: remove .mcp.json to enable on-demand only
The MCP server configuration will only be enabled when needed rather than being permanently configured.
2025-10-04 16:12:32 +08:00
d6e648595a
refactor(zsh): use nixpkgs packages for zsh plugins
Replace manual GitHub fetchFromGitHub with packaged versions of zsh plugins and consolidate plugin loading through the plugins list instead of manual sourcing.
2025-10-04 10:25:53 +08:00
9971d2d2a5
feat(wezterm): add Alt+Delete to focus master pane
Implements spatial "master pane" focusing that mirrors XMonad's master
window concept. Alt+Delete now focuses the largest pane in the current
tab, completing the unified Delete key semantic across all tools:

- Gui+Delete (XMonad): Focus master window (largest in layout)
- Alt+Delete (WezTerm): Focus master pane (largest, ties to lowest index)
- Delete (Neovim): Center cursor view

The implementation is spatially-aware rather than content-aware,
maintaining the navigation layer's positional abstraction. When panes
are equal-sized, the lowest-indexed pane is chosen for predictability.
2025-10-03 23:53:20 +08:00
3fe607d310
refactor(wezterm): organize keybindings with key table namespaces
Implemented key tables to create clean, organized namespaces for tab and
pane management. This refactoring improves keybinding discoverability and
reduces cognitive load by grouping related operations.

Key changes:
- LEADER + t enters tab mode (n/q/r for new/quit/rename)
- LEADER + p enters pane mode (s/v/q/m for split/vsplit/quit/maximize)
- LEADER + Escape enters copy mode (vim-like pseudo-normal mode)
- CTRL + SHIFT + v for paste (standard terminal convention)
- Removed smart-splits plugin in favor of simpler native navigation
- Navigation keys remain at top level for quick access
2025-10-03 16:33:17 +08:00
f7de9e3c05
feat(wezterm): unify navigation with XMonad keybindings
Add sequential pane navigation and rotation to match XMonad's window
management pattern. This creates consistent muscle memory across both
the window manager and terminal multiplexer.

Changes:
- Add Alt+PageUp/PageDown for sequential pane focus (mirrors XMonad's window cycling)
- Add Alt+Ctrl+PageUp/PageDown for pane rotation (mirrors XMonad's rotAll)
- Change Leader+Tab to Leader+t for new tab (free up 't' was for zoom, now 'm')
- Change zoom from Leader+t to Leader+m (matches XMonad's maximize mnemonic)

Keybinding philosophy:
- Base keys (Alt+PageUp/Down) = navigation/viewing
- Ctrl modifier = structural control (resize/rotate)
- Consistent with XMonad: Mod+PageUp/Down (focus), Mod+Ctrl+PageUp/Down (rotate)
2025-10-03 00:15:05 +08:00
83f23c3fd1
feat(wezterm): enhance tab management and simplify pane controls
Replace dynamic pane management with explicit keybindings for better
discoverability. Add dmenu-based tab renaming and direct tab navigation
by index for improved workflow efficiency.
2025-10-02 11:33:42 +08:00
591346600f
refactor: centralize unfree package allowlists
Move all allowUnfreePredicate declarations to global configs to prevent
the "last definition wins" merging issue. Unfree packages are now managed
in two central locations:
- NixOS system packages: nixos/common/global/default.nix
- Home Manager packages: home-manager/sajenim/global/default.nix
2025-10-01 10:23:20 +08:00
34b4705d46
feat: add Discord with BetterDiscord support 2025-10-01 10:13:46 +08:00
2ba755c7d1
chore: add MCP server configuration for NixOS integration 2025-09-30 16:36:57 +08:00
9353a5e50d
chore: add claude-code flake input
Include claude-code-nix overlay for AI-powered coding assistant
2025-09-30 16:11:13 +08:00
b4261d8a11
docs: clarify editor configuration comments
Add descriptive comments explaining overlay usage and package section purpose
2025-09-30 16:10:37 +08:00
696112f7cf
enlarge wezterm, this is the ideal size as we get 2x neovim panes at 100char + 5 char buffer 2025-09-29 20:23:58 +08:00
e5d1ba38d4
remove ollama service from fuchsia host
- Remove ollama service configuration and dependencies
- Clean up traefik routing for ollama web interface
- Comment out traefik service examples for clarity
2025-09-29 18:30:59 +08:00
5b4944696e
enhance wezterm: add intelligent development layout with Claude integration
- Create 3-pane layout automatically: editor (main), terminal (bottom 30%), Claude sidebar (left 25%)
- Implement smart focus management between editor and terminal panes
- Add zoom toggling for distraction-free editing sessions
- Launch Claude Code automatically in dedicated sidebar pane
2025-09-29 13:12:12 +08:00
abbf55046f
chore: bump inputs 2025-09-29 12:43:23 +08:00
24636c5081
unify splits with neovim 2025-09-29 11:05:21 +08:00
2a63eb381c
add Claude Code integration
- Add CLAUDE.md with comprehensive repository documentation
- Configure claude-code package in editors feature
- Add MCP nixos integration for better Nix ecosystem support
- Include Claude settings with co-authored-by disabled
- Update unfree predicate for proprietary AI tools
2025-09-29 09:13:00 +08:00
d25c4ad382
update flake inputs
- flake-parts: update for better module composition
- nixvim config: latest updates from upstream
- nixpkgs: fresh package versions
- ixx: bump to v0.1.1 for improved functionality
2025-09-29 09:11:56 +08:00
9c07f33ff8
we no longer use aider but lets keep this 2025-09-28 12:05:55 +08:00
f8e8c02a69
update context length 2025-09-27 21:29:15 +08:00
969075a5de
refactor traefik + add open-webui service 2025-09-27 10:16:18 +08:00
2f545a818f
update configuration of our ollama service 2025-09-26 23:28:15 +08:00
b0be0f9042
refactor 2025-09-26 19:04:48 +08:00
d414ff36ce
refactor 2025-09-26 18:07:05 +08:00
dc87a6ebe0
persiste /var/lib/private 2025-09-26 18:06:42 +08:00
1b857236ee
reduce time to keep garbage 2025-09-26 18:06:08 +08:00
3f40905886
remove host 2025-09-26 18:04:02 +08:00
9c89db8466
chore: bump inputs 2025-09-26 17:16:23 +08:00
7a7b81566a
chore: bump xmonad-config 2025-09-01 23:47:04 +08:00
bce8012209
chore: add all 2025-09-01 01:48:47 +08:00
cf0916ca4b
setup pipewire 2025-09-01 01:47:59 +08:00
7f5baabb23
remove project send 2025-09-01 01:47:13 +08:00
5f9ab890c6
chore: bump inputs 2025-09-01 01:46:32 +08:00
323820f797
fix: mariadb uses id 999 by default kinda suss 2025-08-07 22:26:18 +08:00
f38067ab02
chore: update available models 2025-08-07 21:43:26 +08:00
afa0a58d98
chore: bump inputs 2025-08-07 21:41:59 +08:00
03a597ae6d
feat: setup projectsend docker containers 2025-08-07 21:41:33 +08:00
77ac5e4fc3
chore: bump inputs 2025-07-23 09:24:46 +08:00
9ee804dba4
install btop 2025-07-23 08:07:00 +08:00