mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-12 04:35:41 +03:00
nixos/duosec: fix indentation
This commit is contained in:
parent
0b08c636f2
commit
4f9cea70bd
1 changed files with 14 additions and 14 deletions
|
@ -195,21 +195,21 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf (cfg.ssh.enable || cfg.pam.enable) {
|
config = mkIf (cfg.ssh.enable || cfg.pam.enable) {
|
||||||
environment.systemPackages = [ pkgs.duo-unix ];
|
environment.systemPackages = [ pkgs.duo-unix ];
|
||||||
|
|
||||||
security.wrappers.login_duo.source = "${pkgs.duo-unix.out}/bin/login_duo";
|
security.wrappers.login_duo.source = "${pkgs.duo-unix.out}/bin/login_duo";
|
||||||
environment.etc = loginCfgFile // pamCfgFile;
|
environment.etc = loginCfgFile // pamCfgFile;
|
||||||
|
|
||||||
/* If PAM *and* SSH are enabled, then don't do anything special.
|
/* If PAM *and* SSH are enabled, then don't do anything special.
|
||||||
If PAM isn't used, set the default SSH-only options. */
|
If PAM isn't used, set the default SSH-only options. */
|
||||||
services.openssh.extraConfig = mkIf (cfg.ssh.enable || cfg.pam.enable) (
|
services.openssh.extraConfig = mkIf (cfg.ssh.enable || cfg.pam.enable) (
|
||||||
if cfg.pam.enable then "UseDNS no" else ''
|
if cfg.pam.enable then "UseDNS no" else ''
|
||||||
# Duo Security configuration
|
# Duo Security configuration
|
||||||
ForceCommand ${config.security.wrapperDir}/login_duo
|
ForceCommand ${config.security.wrapperDir}/login_duo
|
||||||
PermitTunnel no
|
PermitTunnel no
|
||||||
${optionalString (!cfg.allowTcpForwarding) ''
|
${optionalString (!cfg.allowTcpForwarding) ''
|
||||||
AllowTcpForwarding no
|
AllowTcpForwarding no
|
||||||
''}
|
''}
|
||||||
'');
|
'');
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue