nix-config/modules/endlessh.nix

22 lines
374 B
Nix

{
config,
lib,
...
}:
with lib; let
cfg = config.modules.endlessh;
in {
options.modules.endlessh = {
enable = mkEnableOption "Enables endlessh.";
port = mkOption {
type = types.port;
default = 2222;
example = 22;
};
};
config.services.endlessh-go = mkIf cfg.enable {
inherit (cfg) enable port;
openFirewall = true;
};
}