feat: profile (personal/work) の配線基盤を追加する#491
Merged
Merged
Conversation
業務用マシンでは入れてよいソフトウェアが private 機と異なりうるため、 machines に profile を持たせ、identity と同様に extraSpecialArgs 経由で全モジュールへ配線する。許容外の値は assert で早期に検知する。 配線確認用に profile="work" の testuser-work エントリを追加。実際に profile でパッケージ等を出し分けるモジュール側の変更は行わない (次PRで業務要件を踏まえて対応する)。 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
machinesにprofile("personal"/"work") を持たせ、identityと同様にextraSpecialArgs経由で全モジュールから参照可能にする配線を追加mkHomeConfig内のassertで早期検知profile = "work"のtestuser-workエントリを追加(実マシンではない)このPRはあくまで配線のみ。どのパッケージ・モジュールを work で外すかは業務要件次第の判断が必要なため、
modules/packages.nix等の実際の出し分けは次PRで対応する。Test plan
nix run nixpkgs#nixfmt -- --check flake.nixnix flake check .→testuser-workが自動的に shallow evaluate されることを確認nix eval .#homeConfigurations.<name>._module.specialArgs.profileで rito528/testuser/testuser-darwin が"personal"、testuser-work が"work"になることを確認config.home.username系 eval が壊れていないことを確認🤖 Generated with Claude Code