Monorepo for Tangled tangled.org

nix/modules/knot: make ssh ports configurable #716

closed opened by boltless.me targeting master from push-qrzyzsxkvpwt
Labels

None yet.

assignee

None yet.

Participants 2
AT URI
at://did:plc:xasnlahkri4ewmbuzly2rlc5/sh.tangled.repo.pull/3m3uxsrdnqk22
-15
Interdiff #0 โ†’ #1
-15
nix/modules/knot.nix
··· 32 32 description = "User that hosts git repos and performs git operations"; 33 33 }; 34 34 35 - sshPorts = mkOption { 36 - type = types.listOf types.port; 37 - default = [22]; 38 - description = "Specifies ports used for ssh"; 39 - }; 40 - 41 - openFirewall = mkOption { 42 - type = types.bool; 43 - default = true; 44 - description = "Open ssh port in the firewall"; 45 - }; 46 - 47 35 stateDir = mkOption { 48 36 type = types.path; 49 37 default = "/home/${cfg.gitUser}"; ··· 144 132 145 133 services.openssh = { 146 134 enable = true; 147 - ports = cfg.sshPorts; 148 135 extraConfig = '' 149 136 Match User ${cfg.gitUser} 150 137 AuthorizedKeysCommand /etc/ssh/keyfetch_wrapper ··· 212 199 Restart = "always"; 213 200 }; 214 201 }; 215 - 216 - networking.firewall.allowedTCPPorts = mkIf cfg.openFirewall cfg.sshPorts; 217 202 }; 218 203 }

History

3 rounds 4 comments
sign up or login to add to the discussion
1 commit
expand
nix/modules/knot: remove firewall settings
3/3 success
expand
expand 4 comments

if openFirewall is not set to true, this is already configurable is it not?

Well.. it is, but as ssh ports are also configurable and the firewall should follow the correct configured ssh ports, I think removing the firewall settings will make things simpler. Users can configure there networks by their own.

ok I'm closing this. the description explicitly states it opens hard-coded port 22, so I think it's fine to leave it not following config.services.openssh.posts.

closed without merging
1 commit
expand
nix/modules/knot: remove firewall settings
3/3 success
expand
expand 0 comments
1 commit
expand
nix/modules/knot: make ssh ports configurable
2/2 success
expand
expand 0 comments