dotfiles/modules/mosh.sys.nix

29 lines
519 B
Nix
Raw Normal View History

{
2023-06-18 00:46:31 +00:00
pkgs,
lib,
config,
...
}: 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 {
2023-06-18 00:46:31 +00:00
environment.systemPackages = [pkgs.mosh];
networking.firewall = lib.mkIf config.networking.firewall.enable {
allowedUDPPortRanges = [
2023-06-18 00:46:31 +00:00
{
from = 60000;
to = 61000;
} # mosh
];
};
};
}