diff options
author | Azat Bahawi <azat@bahawi.net> | 2024-04-21 02:15:42 +0300 |
---|---|---|
committer | Azat Bahawi <azat@bahawi.net> | 2024-04-21 02:15:42 +0300 |
commit | e6ed60548397627bf10f561f9438201dbba0a36e (patch) | |
tree | f9a84c5957d2cc4fcd148065ee9365a0c851ae1c /modules/endlessh.nix | |
parent | 9ac64328603d44bd272175942d3ea3eaadcabd04 (diff) |
2024-04-21
Diffstat (limited to 'modules/endlessh.nix')
-rw-r--r-- | modules/endlessh.nix | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/modules/endlessh.nix b/modules/endlessh.nix new file mode 100644 index 0000000..f1bf0bc --- /dev/null +++ b/modules/endlessh.nix @@ -0,0 +1,30 @@ +{ config, lib, ... }: +with lib; +let + cfg = config.nixfiles.modules.endlessh; +in +{ + options.nixfiles.modules.endlessh.enable = mkEnableOption "endlessh"; + + config = + let + port = 22; + in + mkIf cfg.enable { + ark.directories = [ + "/var/lib/gotify-server" + "/var/lib/private/gotify-server" + ]; + + services.endlessh = { + enable = true; + inherit port; + extraOptions = [ + "-v" + "-4" + ]; + }; + + networking.firewall.allowedTCPPorts = [ port ]; + }; +} |