feat: flake.nix を multi-system 対応にする#490
Merged
Merged
Conversation
将来 macOS (Apple Silicon) でも dotfiles を使うため、system 固定だった pkgs 生成と mkHomeConfig を system パラメータ化。評価確認用に aarch64-darwin 向け homeConfigurations (testuser-darwin) を追加し、 CI でも eval で壊れていないことを検知できるようにする。 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
mkHomeConfig を毎回位置引数で呼ぶ形は、今後プロファイル分岐などで 引数が増えると見通しが悪くなるため、machines attrset に system/username/homeDirectory/personal をまとめ、mapAttrs で homeConfigurations を生成する形に変更した。 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
「personal」は今後 work/personal のプロファイル分岐を入れると 意味が衝突するため、name/email/gpgKey を保持する Git ID 情報である ことがわかる identity に改名した。 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
system固定だった pkgs 生成とmkHomeConfigを system パラメータ化aarch64-darwin向けhomeConfigurations.testuser-darwinを追加nix.yaml) に darwin 側の eval チェックを追加し、Linux 専用な変更で aarch64-darwin 評価が壊れたことを Mac 実機なしで検知できるようにするこのPRの範囲は flake の骨格対応まで。
modules/actrun.nixなど Linux 専用パッケージの Darwin 対応、実ユーザー用 Mac エントリ、実機でのhome-manager switch検証は後続PRで対応する。Test plan
nix run nixpkgs#nixfmt -- --check flake.nixnix flake check .nix eval .#homeConfigurations.testuser-darwin.config.home.username→"testuser"nix eval .#homeConfigurations.testuser.config.home.username/rito528が引き続き評価できることを確認🤖 Generated with Claude Code