2023-01-13 06:42:21 +00:00
|
|
|
{ pkgs
|
|
|
|
, lib
|
|
|
|
, config
|
|
|
|
, ...
|
2023-01-20 21:13:14 +00:00
|
|
|
}:
|
|
|
|
let cfg = config.mod.mosh; in
|
|
|
|
{
|
|
|
|
options.mod.mosh = {
|
|
|
|
enable = lib.mkOption {
|
|
|
|
type = lib.types.bool;
|
|
|
|
description = "enable mosh";
|
|
|
|
default = true;
|
|
|
|
example = false;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
|
|
environment.systemPackages = [ pkgs.mosh ];
|
|
|
|
networking.firewall = lib.mkIf config.networking.firewall.enable {
|
|
|
|
allowedUDPPortRanges = [
|
|
|
|
{ from = 60000; to = 61000; } # mosh
|
|
|
|
];
|
|
|
|
};
|
2022-12-25 23:15:15 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|