24 lines
400 B
Nix
Raw Normal View History

2025-05-04 02:47:36 +02:00
{
config,
lib,
...
}:
with lib; let
2025-07-27 22:50:25 +02:00
cfg = config.home.security.ssh;
2025-05-04 02:47:36 +02:00
in {
2025-07-27 22:50:25 +02:00
options.home.security.ssh = {
2025-05-04 02:47:36 +02:00
enable = mkEnableOption "enables SSH";
hosts = mkOption {
type = types.nullOr types.path;
default = null;
};
};
config = {
programs.ssh = mkIf cfg.enable {
enable = true;
2025-07-27 22:50:25 +02:00
includes = lists.optional (cfg.hosts != null) cfg.hosts;
2025-05-04 02:47:36 +02:00
};
};
}