refactor(ssh): centralize identity file logic and optimize host selection
Refactor the SSH configuration generation to reduce duplication and improve efficiency. - Extract `IdentityFile` line generation into a shared variable in `ssh-inventory.nix` to ensure consistency between per-host and gitea blocks. - Optimize `selectedHosts` resolution in `home-manager/default.nix` by reusing `activeHosts` when the "all" wildcard is used. - Tighten IPv4 regex matching in `ssh-inventory.nix` using anchors. - Update `users-merge.nix` to propagate `extraIdentities` to the rbw outbound configuration. - Set default `authorizedHosts` to "all" for inbound SSH users.
This commit is contained in:
@@ -60,6 +60,7 @@
|
||||
chiasson.ssh.outbound.rbw.user = name;
|
||||
chiasson.ssh.outbound.rbw.hosts =
|
||||
if (outboundCfg.hosts or "all") == "all" then [ "all" ] else outboundCfg.hosts;
|
||||
chiasson.ssh.outbound.rbw.extraIdentities = outboundCfg.extraIdentities or [ ];
|
||||
};
|
||||
|
||||
mkHmUserModule =
|
||||
|
||||
Reference in New Issue
Block a user