2023-02-24 12:35:58 +01:00
|
|
|
{ options, config, pkgs, lib, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
#with lib.internal;
|
|
|
|
let cfg = config.custom.system.ssh;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
options.custom.system.ssh = with types; {
|
|
|
|
enable = mkBoolOpt false "Whether or not to enable ssh.";
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
2023-04-05 09:19:06 +02:00
|
|
|
services.openssh = {
|
|
|
|
enable = true;
|
|
|
|
passwordAuthentication = false;
|
2023-04-05 09:21:51 +02:00
|
|
|
kbdInteractiveAuthentication = false;
|
2023-04-05 09:19:06 +02:00
|
|
|
settings.X11forwarding = true;
|
|
|
|
settings.PermitRootLogin = "yes";
|
2023-04-05 09:21:51 +02:00
|
|
|
};
|
2023-03-06 12:57:17 +01:00
|
|
|
environment.systemPackages = with pkgs; [ sshfs ];
|
2023-02-24 12:35:58 +01:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|