mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-12 05:16:25 +03:00
sshd: provide option to disable firewall altering
This commit is contained in:
parent
0b559ed1cd
commit
c61a9dfd2e
1 changed files with 10 additions and 2 deletions
|
@ -137,6 +137,14 @@ in
|
|||
'';
|
||||
};
|
||||
|
||||
openFirewall = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = ''
|
||||
Whether to automatically open the specified ports in the firewall.
|
||||
'';
|
||||
};
|
||||
|
||||
listenAddresses = mkOption {
|
||||
type = with types; listOf (submodule {
|
||||
options = {
|
||||
|
@ -302,7 +310,7 @@ in
|
|||
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = cfg.ports;
|
||||
networking.firewall.allowedTCPPorts = if cfg.openFirewall then cfg.ports else [];
|
||||
|
||||
security.pam.services.sshd =
|
||||
{ startSession = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue