about summary refs log tree commit diff
path: root/nixos/tests/openssh.nix
diff options
context:
space:
mode:
authorTom Fitzhenry <tom@tom-fitzhenry.me.uk>2024-05-04 23:02:53 +1000
committerTom Fitzhenry <tom@tom-fitzhenry.me.uk>2024-05-04 23:14:47 +1000
commitff1c82ee07514b770092a2651d3d5d27f5003cee (patch)
tree38b269b3a406cb80d1e1b2c7bc29212ef93c6b92 /nixos/tests/openssh.nix
parent3fb8aadfd03c5fd44ca84a38a41def7c4631dfb3 (diff)
nixos/ssh: add services.openssh.package
Motivation: Allow the sshd package to be built differently to the ssh
package (programs.ssh.package). For example, build sshd(1) without
openssl, but built ssh(1) with OpenSSL support.

Set the default to be programs.ssh.package, to preserve compatibility.
Diffstat (limited to 'nixos/tests/openssh.nix')
-rw-r--r--nixos/tests/openssh.nix12
1 files changed, 6 insertions, 6 deletions
diff --git a/nixos/tests/openssh.nix b/nixos/tests/openssh.nix
index 2684b6f45e84e..4d3a562392ed1 100644
--- a/nixos/tests/openssh.nix
+++ b/nixos/tests/openssh.nix
@@ -111,11 +111,11 @@ in {
     server-no-openssl =
       { ... }:
       {
-        programs.ssh.package = pkgs.opensshPackages.openssh.override {
-          linkOpenssl = false;
-        };
         services.openssh = {
           enable = true;
+          package = pkgs.opensshPackages.openssh.override {
+            linkOpenssl = false;
+          };
           hostKeys = [
             { type = "ed25519"; path = "/etc/ssh/ssh_host_ed25519_key"; }
           ];
@@ -136,11 +136,11 @@ in {
     server-no-pam =
       { pkgs, ... }:
       {
-        programs.ssh.package = pkgs.opensshPackages.openssh.override {
-          withPAM = false;
-        };
         services.openssh = {
           enable = true;
+          package = pkgs.opensshPackages.openssh.override {
+            withPAM = false;
+          };
           settings = {
             UsePAM = false;
           };