ssh: don't install a client by default (#4016)

Make use of the recently added nullable `mkPackageOption` feature
to disable installing an SSH client by default: most people should use
the client provided by their system.
This commit is contained in:
Naïm Favier 2023-05-27 14:11:50 +02:00 committed by GitHub
parent 6a19225683
commit 2d963854ae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 8 additions and 24 deletions

View file

@ -361,7 +361,11 @@ in
options.programs.ssh = {
enable = mkEnableOption "SSH client configuration";
package = mkPackageOption pkgs "openssh" { };
package = mkPackageOption pkgs "openssh" {
nullable = true;
default = null;
extraDescription = "By default, the client provided by your system is used.";
};
forwardAgent = mkOption {
default = false;
@ -527,7 +531,7 @@ in
}
];
home.packages = [ cfg.package ];
home.packages = optional (cfg.package != null) cfg.package;
home.file.".ssh/config".text =
let