Skip to content

Commit

Permalink
fix(ssh): remove branching by version
Browse files Browse the repository at this point in the history
  • Loading branch information
misumisumi committed May 12, 2024
1 parent 5cd901e commit f08e08b
Showing 1 changed file with 11 additions and 19 deletions.
30 changes: 11 additions & 19 deletions apps/ssh/default.nix
Original file line number Diff line number Diff line change
@@ -1,28 +1,20 @@
{ config
, lib
, stateVersion
, ...
}: {
programs.ssh = {
askPassword = "";
};
networking.firewall.allowedTCPPorts = config.services.openssh.ports;
services.openssh =
{
enable = true;
ports = [ 12511 ];
extraConfig = ''
UsePAM yes
'';
}
// lib.attrsets.optionalAttrs (stateVersion <= "22.11") {
kbdInteractiveAuthentication = true;
forwardX11 = true;
}
// lib.attrsets.optionalAttrs (stateVersion > "22.11") {
settings = {
KbdInteractiveAuthentication = true;
X11Forwarding = true;
};
services.openssh = {
enable = true;
ports = [ 12511 ];
extraConfig = ''
UsePAM yes
'';

settings = {
KbdInteractiveAuthentication = true;
X11Forwarding = true;
};
};
}

0 comments on commit f08e08b

Please sign in to comment.