Shared nix modules for my configurations.
0

Configure Feed

Select the types of activity you want to include in your feed.

feat(infra-options): add infra.host.class enum

Adds a required host classification (no default) so consumers can scope
fleet-level invariants and policy to the right host shape. Values cover
the current consumer fleet:
- nixos-server, nixos-pi, nixos-cache, nixos-microvm, nixos-iso
- darwin-workstation

Option is read by invariant test harnesses; system builds don't depend
on it.

Ivan Ilak (May 25, 2026, 1:46 PM +0200) abbb7375 d2409921

+16
+16
modules/shared/global_variables/default.nix
··· 128 128 type = lib.types.str; 129 129 description = "Logical hostname used in infra options (distinct from networking.hostName)."; 130 130 }; 131 + class = lib.mkOption { 132 + type = lib.types.enum [ 133 + "nixos-server" 134 + "nixos-pi" 135 + "nixos-cache" 136 + "nixos-microvm" 137 + "nixos-iso" 138 + "darwin-workstation" 139 + ]; 140 + description = '' 141 + Host classification used by invariant tests to scope predicates 142 + to the right host shape (e.g. "microvms must not expose port 22" 143 + applies to class = "nixos-microvm" only). No default — every host 144 + must declare its class explicitly. 145 + ''; 146 + }; 131 147 user = lib.mkOption { 132 148 type = lib.types.str; 133 149 default = "root";