Add GitHub Actions validation for flake, NixOS config, and Home Manager eval#8
Conversation
Agent-Logs-Url: https://github.com/Uliboooo/dotfiles/sessions/8224d389-028e-4924-937e-05585a4e01a5 Co-authored-by: Uliboooo <190558756+Uliboooo@users.noreply.github.com>
Agent-Logs-Url: https://github.com/Uliboooo/dotfiles/sessions/8224d389-028e-4924-937e-05585a4e01a5 Co-authored-by: Uliboooo <190558756+Uliboooo@users.noreply.github.com>
Uliboooo
left a comment
There was a problem hiding this comment.
-
push:のブランチが未指定のため、すべてのブランチへのpushで実行される。branches: [main]に絞り込むことを推奨。 -
actions/checkout@v4とcachix/install-nix-action@v31がタグ指定のみでSHA未固定。サプライチェーン攻撃のリスクがあるため、コミットSHAでのピン留めを推奨。 -
--show-traceによりエラー時に内部パスやホスト名(desktop)、ユーザー名(alice)がログに出力される。パブリックリポジトリの場合は情報漏洩に注意。 -
nix flake checkはデフォルトですべてのシステムに対して実行される。対象システムを明示的に指定(例:--system x86_64-linux)することでCI時間の短縮と意図の明確化が図れる。 -
ジョブにタイムアウト設定がない。
nix flake checkは環境によって長時間かかることがあるため、timeout-minutes:の追加を推奨。 -
Nixバイナリキャッシュ(Cachix等)の設定がないため、毎回フルビルドになる可能性がある。CIの高速化のためキャッシュ設定の追加を検討。
Agent-Logs-Url: https://github.com/Uliboooo/dotfiles/sessions/3f94f674-9aaf-4216-a2b0-81027ea0fff4 Co-authored-by: Uliboooo <190558756+Uliboooo@users.noreply.github.com>
対応コミットは |
This PR adds CI coverage for the repository’s Nix setup so invalid flake/config changes are caught in GitHub Actions instead of at local rebuild time. It specifically validates both system (
nixosConfigurations.desktop) and Home Manager (users.alice) evaluation paths.Workflow added: Nix config validation in CI
.github/workflows/nix-validate.ymlpull_requestandpushtomaintimeout-minutes: 30nix flake check --system x86_64-linuxnix eval .#nixosConfigurations.desktop.config.system.build.toplevel.drvPathnix eval .#nixosConfigurations.desktop.config.home-manager.users.alice.home.activationPackage.drvPathSecurity hardening
permissions: { contents: read }actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5(v4)cachix/install-nix-action@8aa03977d8d733052d78f4e008a241fd1dbf36b3(v31)