nixos/sshd: Fix socket activated SSH connections entering failed state.

In afeb76d628, sshd.service and
sshd@.service were switched to Type=notify. This apparently works for
sshd.service, but not for sshd@.service. Given that the reason for
this working with sshd.service isn't exactly clear, let's revert it
for both of them for now, and revisit Type=notify later.
This commit is contained in:
Will Fancher
2025-03-16 23:02:22 -04:00
parent a0962df902
commit 4dcde98327
2 changed files with 3 additions and 2 deletions
@@ -593,7 +593,6 @@ in
environment.LD_LIBRARY_PATH = nssModulesPath;
serviceConfig = {
Type = "notify";
ExecStart = lib.concatStringsSep " " [
"-${lib.getExe' cfg.package "sshd"}"
"-i"
@@ -618,7 +617,6 @@ in
restartTriggers = [ config.environment.etc."ssh/sshd_config".source ];
serviceConfig = {
Type = "notify";
Restart = "always";
ExecStart = lib.concatStringsSep " " [
(lib.getExe' cfg.package "sshd")
+3
View File
@@ -274,5 +274,8 @@ in {
"ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i privkey.snakeoil server-no-pam true",
timeout=30
)
# None of the per-connection units should have failed.
server_lazy.fail("systemctl is-failed 'sshd@*.service'")
'';
})