From 6195c03ae61867cee24cf84f6f5513abd3dd2d75 Mon Sep 17 00:00:00 2001 From: Jou Okuyama Date: Wed, 30 Sep 2026 05:26:34 +0900 Subject: [PATCH] =?UTF-8?q?PR=E3=81=A7Nix=E8=A8=AD=E5=AE=9A=E3=81=AE?= =?UTF-8?q?=E8=A9=95=E4=BE=A1=E3=82=92=E3=83=81=E3=82=A7=E3=83=83=E3=82=AF?= =?UTF-8?q?=E3=81=99=E3=82=8BCI=E3=82=92=E8=BF=BD=E5=8A=A0=E3=81=97?= =?UTF-8?q?=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 5.5 --- .github/workflows/ci.yml | 27 +++++++++++++++++++++++++++ AGENTS.md | 1 + 2 files changed, 28 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..68cd5ed --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,27 @@ +name: ci + +on: + pull_request: + branches: + - main + workflow_dispatch: + +permissions: + contents: read + +jobs: + eval: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v7 + - uses: DeterminateSystems/determinate-nix-action@v3 + - name: Link checkout to the path expected by dotfilesPath + run: | + sudo mkdir -p /Users/Ojoxux + sudo ln -s "$GITHUB_WORKSPACE" /Users/Ojoxux/dotfiles + - name: Evaluate darwinConfigurations.check + run: nix eval --impure --raw .#darwinConfigurations.check.config.system.build.toplevel.drvPath + - name: Evaluate darwinConfigurations.powehi + run: nix eval --impure --raw .#darwinConfigurations.powehi.config.system.build.toplevel.drvPath + - name: Evaluate nixosConfigurations.sgra + run: nix eval --raw .#nixosConfigurations.sgra.config.system.build.toplevel.drvPath diff --git a/AGENTS.md b/AGENTS.md index c3d6027..f48d32c 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -110,3 +110,4 @@ powehi固有機能。内蔵ディスプレイの割れた部分を避けるた - **Determinate Nix**: `nix.enable = false`としてnix-darwin本体にはNixデーモン管理をさせず、Determinate Nixに任せている。`nix.gc`が使えないため、ガベージコレクションはlaunchdデーモン(`modules/darwin.nix`の`launchd.daemons.nix-gc`)で代替している。 - **カーソル表示のワークアラウンド**: AI agent CLI(Claude Code等)が`\e[?25l`でカーソルを隠したまま復元し忘れることがあるため、`modules/zsh.nix`の`precmd_functions`にカーソルを強制表示する関数を登録し、`modules/tmux.nix`側でも`pane-focus-in`/`client-focus-in`フックと`prefix + r`(手動リストア)を用意している。`modules/zsh.nix`はさらに、Ghosttyの`command=`設定が効く前のフォールバックとして、対話シェルかつ`TERM_PROGRAM=ghostty`かつtmux外のときに自動で`tmux new -A -s main`する(IDEターミナルやネストしたtmuxはスキップ)。 - **tmuxのWi-Fi表示** (`modules/tmux.nix`の`tmux-wifi-status`): macOSはターミナルにLocation Services権限が無いとSSIDを``に伏せる。`networksetup`で取れなければ`ipconfig getsummary`にフォールバックし、それでも駄目なら接続の有無だけ`Wi-Fi`と表示する。 +- **CIの評価チェック** (`.github/workflows/ci.yml`): PRごとにubuntu上で`darwinConfigurations.check`・`powehi`・`nixosConfigurations.sgra`の`toplevel.drvPath`を`nix eval`するだけで、ビルドや適用はしない。`nix flake check`を使わない理由: `local`は`hosts/local.nix`が`.gitignore`対象でCIのチェックアウトに存在せず、評価で落ちるため。darwin側に`--impure`が要る理由: `dotfilesPath`が`/Users/Ojoxux/dotfiles/...`の絶対パスを返し、`modules/git.nix`等がそれを参照するため。ランナー上ではチェックアウトをそのパスにシンボリックリンクして合わせている。`sgra`はpureのまま評価できる。