feat(inventory): introduce NixOS-native inventory module system - #209
Draft
MattiasKockum wants to merge 2 commits into
Draft
feat(inventory): introduce NixOS-native inventory module system#209MattiasKockum wants to merge 2 commits into
MattiasKockum wants to merge 2 commits into
Conversation
Adds modules/inventory/ with two new NixOS modules: - modules/inventory/users.nix: declares securix.inventory.users.<name> options and provisions Linux accounts automatically via users.users - modules/inventory/machines.nix: declares securix.inventory.machine options and bridges to securix.self.* via lib.mkDefault Also adds mkTerminal-refactor and mkTerminals-refactor in lib/default.nix as drop-in replacements that drop userSpecificModule/extraOperators in favor of plain NixOS modules passed via the modules argument. The existing mkTerminal, mkTerminals and readInventory2 are left intact for backward compatibility. A follow-up commit will be able to deprecate them. Closes cloud-gouv#196 (partial: introduces the new system, migration of bureautix-example and deprecation of the old API are to follow) Tests: - tests/inventory2.nix: regression test for the existing readInventory2 + mkTerminal behavior - tests/inventory-refactor.nix: integration test for the new securix.inventory.* module system
rlahfa-dinum
marked this pull request as draft
August 14, 2026 15:32
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.
Adds modules/inventory/ with two new NixOS modules:
options and provisions Linux accounts automatically via users.users
Also adds mkTerminal-refactor and mkTerminals-refactor in lib/default.nix as drop-in replacements that drop userSpecificModule/extraOperators in favor of plain NixOS modules passed via the modules argument.
The existing mkTerminal, mkTerminals and readInventory2 are left intact for backward compatibility. A follow-up commit will be able to deprecate them.
Closes #196 (partial: introduces the new system, migration of bureautix-example and deprecation of the old API are to follow)
Tests: