Skip to content

seekerkrt/dotfiles

Repository files navigation

seekerkrt's Dotfiles

日本語 | English


日本語

Caution

【重要】これは個人専用のバックアップリポジトリです 本リポジトリは、作者の特定のハードウェアおよび環境 (Arch Linux / Windows 11 デュアルブート)に依存した個人用設定です。 汎用テンプレートや、他人がそのまま導入するためのものではありません。

特にSecure Boot関連の設定やハードウェア固有のスクリプトは、 そのまま実行すると最悪の場合**システムが起動しなくなる、 あるいはデータが破損する恐れ(ランドマイン)**があります。 内容を十分に理解せずにコピー&ペーストしたり、 スクリプトを実行したりしないでください。

概要

このリポジトリは、作者(seekerkrt)の設定ファイルを管理・同期するためのものです。 GNU Stowによるホームディレクトリへの展開、Secure Boot運用スクリプト、 パッケージ一覧のバックアップなどを含みます。

本リポジトリはGitHubを本家として運用されており、GitLab上の同名リポジトリはバックアップミラーです。主な更新元はGitHubです。 また、秘密鍵やトークンなどの機密情報は管理対象外となっています。

プロジェクトの主な構造

.
├── stow/                     # GNU Stowで展開するユーザー設定
│   ├── alacritty/            # Alacritty設定
│   ├── bash/                 # Bash設定
│   ├── btop/                 # btop設定
│   ├── chrome/               # Chrome設定
│   ├── clang-format/         # clang-format設定
│   ├── claude/               # Claude Code設定(→ エージェント設定の参照先)
│   ├── codex/                # Codex設定(→ エージェント設定の参照先)
│   ├── conky/                # Conky設定
│   ├── emacs/                # Emacs設定
│   ├── env/                  # 環境変数設定
│   ├── fonts/                # フォント設定
│   ├── foot/                 # footターミナル設定
│   ├── gemini/               # Antigravity CLI設定(→ エージェント設定の参照先)
│   ├── git/                  # Git設定
│   ├── hypr/                 # Hyprland設定
│   ├── kde/                  # KDE設定
│   ├── mako/                 # mako通知ツール設定
│   ├── nvim/                 # Neovim設定
│   ├── scripts/              # 個人用スクリプト
│   ├── sway/                 # Sway設定
│   ├── systemd-user/         # systemdユーザーサービス設定
│   ├── tmux/                 # tmux設定
│   ├── tmuxp/                # tmuxp設定
│   ├── vim/                  # Vim設定
│   ├── vscode/               # VS Code設定
│   ├── waybar/               # Waybar設定
│   ├── wezterm/              # WezTerm設定
│   ├── xorg/                 # X.Org設定
│   ├── yazi/                 # yaziファイラー設定
│   ├── zsh/                  # Zsh設定
│   └── zsh-functions/        # Zsh関数
├── system/secureboot/        # Secure Boot関連の設定とスクリプト
├── pkglist/                  # 明示インストール済みパッケージ一覧
├── encrypted/                # 暗号化されたバックアップファイル等
├── sample/                   # システム設定ファイルのサンプル
├── apply-stow.sh             # Stowリンクを作成
├── remove-stow.sh            # Stowリンクを削除
├── update-pkglist.sh         # パッケージ一覧を更新
├── restore-pkglist.sh        # パッケージ一覧から復元
├── backup-ssh-allowlist.sh   # SSH鍵と設定を暗号化バックアップ
├── restore-ssh-allowlist.sh  # 暗号化したSSH鍵と設定を復元
├── backup-ssh-config.sh      # SSH設定のみを暗号化バックアップ
├── restore-ssh-config.sh     # 暗号化したSSH設定のみを復元
└── setup-system.sh           # システム側設定を配置

コーディングエージェント設定の参照先

Important

共通契約の正本は stow/codex/.codex/AGENTS.md の1つだけです。 CLAUDE.mdGEMINI.md はそこからの一方向同期による移植版であり、 エージェント固有の差分だけを局所的に持ちます。 共通ルールを変更する場合は、必ずCodex正本を先に直してください。

各エージェントが実際に読むファイルと、このリポジトリ内での実体の対応は次のとおりです。

エージェント リポジトリ内の実体 実際の参照先 内容
Codex stow/codex/.codex/AGENTS.md ~/.codex/AGENTS.md 共通契約の正本
Codex stow/codex/.agents/skills/ ~/.agents/skills/ Skill 8種
Codex stow/codex/.codex/*.config.toml ~/.codex/ モデル別プロファイル
Claude Code stow/claude/.claude/CLAUDE.md ~/.claude/CLAUDE.md Codex正本からの移植
Claude Code stow/claude/.claude/skills/ ~/.claude/skills/ Skill 8種
Claude Code stow/claude/.claude/settings.json ~/.claude/settings.json 権限、モデル、プラグイン等
Antigravity CLI stow/gemini/.gemini/GEMINI.md ~/.gemini/GEMINI.md Codex正本からの移植
Antigravity CLI stow/gemini/.gemini/antigravity-cli/skills/ ~/.gemini/antigravity-cli/skills/ Skill 8種

Skillは3エージェント共通で次の8種を配置しています。

audit  commit-prep  cpp-conventions  github
handoff  handoff-inline  handoff-archive  verify

Note

Claude Codeだけは verify ではなく verify-diff という名前です。 verify が組み込みコマンドと衝突するため、意図的にリネームしています。 中身の契約は他エージェントの verify と同じです。

handoff系3種(handoff / handoff-inline / handoff-archive)は、 front matterを除いた本文を3エージェントで一致させる運用です。 handoff-inline の親Skill参照パスだけがエージェント固有差分として許容されます。

Warning

~/.gemini はディレクトリごとsymlinkされています。 このためAntigravity CLIの実行時データ(history.jsonllog/conversations/brain/ 等)もこのリポジトリ配下へ書き込まれます。 これらは .gitignore で除外済みで、追跡対象は GEMINI.mdsettings.jsonskills/ のみです。 Codex・Claude Codeはファイル/ディレクトリ単位のsymlinkのため、この問題はありません。

主要スクリプトの使い方

1. ドットファイルの適用・同期

ホームディレクトリ($HOME)に設定ファイルのシンボリックリンクを展開します。

./apply-stow.sh

(展開時、vscode パッケージのみディレクトリ構造を維持するため --no-folding オプションが自動適用されます。)

2. パッケージリストの更新と復元

普段インストールしているパッケージの一覧を管理します。 ・リストの更新(現在の状態を保存):

./update-pkglist.sh

・パッケージの復元(クリーンインストール時など):

./restore-pkglist.sh

(自動的に公式パッケージは pacman、AURパッケージは yay または paru を検出して --needed でインストールします)

3. SSH設定のバックアップと復元

秘密鍵を含むため、リポジトリにコミットしたくない ~/.ssh 以下の重要ファイルを 別ディレクトリへGPG暗号化して退避します。 ・バックアップ(known_hosts 等は除外):

./backup-ssh-allowlist.sh /path/to/secure-backup-dir

・復元:

./restore-ssh-allowlist.sh /path/to/secure-backup-dir

また、~/.ssh/config のみを取り扱う簡易的なバックアップ・復元スクリプトも用意されています(暗号化ファイルは encrypted/ssh-config.tar.gz.gpg に配置されます)。

・SSH設定のみバックアップ:

./backup-ssh-config.sh

・SSH設定のみ復元:

./restore-ssh-config.sh

4. システム側 Secure Boot 構成の配置

sudo ./setup-system.sh

これにより、GRUB更新時に自動で署名をやり直す pacman フックや、 専用のバックアップ・リストアスクリプトが /usr/local/sbin に入ります。 詳細な復旧手順は system/secureboot/README.md を参照してください。


English

Caution

[CRITICAL] Personal Backup Repository Only This repository contains personal configuration files tailored to the author's hardware and environment (Arch Linux / Windows 11 dual-boot). It is NOT a general-purpose template or a reusable setup guide.

In particular, the Secure Boot recovery scripts and hardware-specific configuration could render your system unbootable or cause data loss if executed blindly. Do not copy-paste or execute these scripts unless you thoroughly understand the code.

Overview

This repository manages and syncs the author's (seekerkrt) dotfiles. It includes GNU Stow deployment, Secure Boot maintenance scripts, and package-list backups.

This repository is primarily hosted on GitHub, and the same-named repository on GitLab serves as a backup mirror. GitHub is the primary upstream for updates. Additionally, sensitive information such as private keys and tokens is excluded from this repository.

Repository Structure

.
├── stow/                     # User config deployed by GNU Stow
│   ├── alacritty/            # Alacritty config
│   ├── bash/                 # Bash config
│   ├── btop/                 # btop config
│   ├── chrome/               # Chrome config
│   ├── clang-format/         # clang-format config
│   ├── claude/               # Claude Code config (see: Agent Configuration)
│   ├── codex/                # Codex config (see: Agent Configuration)
│   ├── conky/                # Conky config
│   ├── emacs/                # Emacs config
│   ├── env/                  # Environment variables config
│   ├── fonts/                # Fonts config
│   ├── foot/                 # foot terminal config
│   ├── gemini/               # Antigravity CLI config (see: Agent Configuration)
│   ├── git/                  # Git config
│   ├── hypr/                 # Hyprland config
│   ├── kde/                  # KDE config
│   ├── mako/                 # mako notification daemon config
│   ├── nvim/                 # Neovim config
│   ├── scripts/              # Local scripts
│   ├── sway/                 # Sway config
│   ├── systemd-user/         # systemd user services config
│   ├── tmux/                 # tmux config
│   ├── tmuxp/                # tmuxp config
│   ├── vim/                  # Vim config
│   ├── vscode/               # VS Code config
│   ├── waybar/               # Waybar config
│   ├── wezterm/              # WezTerm config
│   ├── xorg/                 # X.Org config
│   ├── yazi/                 # yazi terminal file manager config
│   ├── zsh/                  # Zsh config
│   └── zsh-functions/        # Zsh functions
├── system/secureboot/        # Secure Boot config and scripts
├── pkglist/                  # Explicit package lists
├── encrypted/                # Encrypted backup storage
├── sample/                   # System configuration samples
├── apply-stow.sh             # Create Stow links
├── remove-stow.sh            # Remove Stow links
├── update-pkglist.sh         # Update package lists
├── restore-pkglist.sh        # Restore packages from lists
├── backup-ssh-allowlist.sh   # Back up SSH keys and config with GPG
├── restore-ssh-allowlist.sh  # Restore SSH keys and config from GPG
├── backup-ssh-config.sh      # Back up only SSH config with GPG
├── restore-ssh-config.sh     # Restore only SSH config from GPG
└── setup-system.sh           # Install system-side config

Agent Configuration

Important

stow/codex/.codex/AGENTS.md is the single source of truth for the shared contract. CLAUDE.md and GEMINI.md are one-way ports of that file and carry only agent-specific deltas. Always edit the Codex source first when changing a shared rule.

Each agent reads the following files, backed by this repository:

Agent Source in this repo Resolved path Contents
Codex stow/codex/.codex/AGENTS.md ~/.codex/AGENTS.md Canonical shared contract
Codex stow/codex/.agents/skills/ ~/.agents/skills/ 8 skills
Codex stow/codex/.codex/*.config.toml ~/.codex/ Per-model profiles
Claude Code stow/claude/.claude/CLAUDE.md ~/.claude/CLAUDE.md Port of the Codex source
Claude Code stow/claude/.claude/skills/ ~/.claude/skills/ 8 skills
Claude Code stow/claude/.claude/settings.json ~/.claude/settings.json Permissions, model, plugins
Antigravity CLI stow/gemini/.gemini/GEMINI.md ~/.gemini/GEMINI.md Port of the Codex source
Antigravity CLI stow/gemini/.gemini/antigravity-cli/skills/ ~/.gemini/antigravity-cli/skills/ 8 skills

All three agents carry the same eight skills:

audit  commit-prep  cpp-conventions  github
handoff  handoff-inline  handoff-archive  verify

Note

On Claude Code the skill is named verify-diff, not verify. It is renamed deliberately because verify collides with a built-in command. The contract itself matches the other agents' verify.

The three handoff skills (handoff / handoff-inline / handoff-archive) are kept body-identical across all three agents, front matter excluded. The only permitted per-agent delta is the parent-skill reference path in handoff-inline.

Warning

~/.gemini is symlinked as a whole directory. As a result, Antigravity CLI runtime data (history.jsonl, log/, conversations/, brain/, ...) is written inside this repository. Those paths are excluded via .gitignore; only GEMINI.md, settings.json and skills/ are tracked. Codex and Claude Code symlink individual files and directories, so they are not affected.

Usage of Core Scripts

1. Deploy Dotfiles

Creates symlinks from the stow/ directory to your $HOME.

./apply-stow.sh

(Note: The vscode profile automatically triggers --no-folding to keep the inner directory architecture intact.)

2. Package Management

Track and sync installed packages across installations. ・To Save Current Packages:

./update-pkglist.sh

・To Restore Packages:

./restore-pkglist.sh

(Automatically detects yay or paru for foreign/AUR packages and applies --needed)

3. SSH Configuration Backup and Restore

Securely backs up critical SSH files (including private keys) into a GPG-encrypted archive outside the git history. ・Backup (excludes known_hosts, etc.):

./backup-ssh-allowlist.sh /path/to/secure-backup-dir

・Restore:

./restore-ssh-allowlist.sh /path/to/secure-backup-dir

Additionally, utility scripts to backup and restore only the ~/.ssh/config file are available (the encrypted archive is saved in encrypted/ssh-config.tar.gz.gpg).

・Backup SSH Config only:

./backup-ssh-config.sh

・Restore SSH Config only:

./restore-ssh-config.sh

4. Secure Boot Setup (System-wide)

sudo ./setup-system.sh

This deploys tools to /usr/local/sbin and handles automatic sbctl re-signing whenever grub updates via a post-transaction pacman hook. For recovery details, refer to system/secureboot/README.md.

About

Personal dotfiles for Arch Linux

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages