File tree 1 file changed +10
-2
lines changed
nixos/modules/services/networking/ssh
1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 21
21
daemon reads in addition to the the user's authorized_keys file.
22
22
You can combine the <literal>keys</literal> and
23
23
<literal>keyFiles</literal> options.
24
- Warning: If you are using <literal>NixOps</literal> then don't use this
24
+ Warning: If you are using <literal>NixOps</literal> then don't use this
25
25
option since it will replace the key required for deployment via ssh.
26
26
'' ;
27
27
} ;
137
137
'' ;
138
138
} ;
139
139
140
+ openFirewall = mkOption {
141
+ type = types . bool ;
142
+ default = true ;
143
+ description = ''
144
+ Whether to automatically open the specified ports in the firewall.
145
+ '' ;
146
+ } ;
147
+
140
148
listenAddresses = mkOption {
141
149
type = with types ; listOf ( submodule {
142
150
options = {
302
310
303
311
} ;
304
312
305
- networking . firewall . allowedTCPPorts = cfg . ports ;
313
+ networking . firewall . allowedTCPPorts = if cfg . openFirewall then cfg . ports else [ ] ;
306
314
307
315
security . pam . services . sshd =
308
316
{ startSession = true ;
You can’t perform that action at this time.
0 commit comments