2016-03-26 04:22:52 +01:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
|
|
|
|
cfg = config.programs.mosh;
|
|
|
|
|
|
|
|
in
|
|
|
|
{
|
|
|
|
options.programs.mosh = {
|
2016-12-16 17:58:40 +01:00
|
|
|
enable = mkOption {
|
|
|
|
description = ''
|
|
|
|
Whether to enable mosh. Note, this will open ports in your firewall!
|
|
|
|
'';
|
|
|
|
default = false;
|
|
|
|
type = lib.types.bool;
|
|
|
|
};
|
2016-03-26 04:22:52 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
environment.systemPackages = with pkgs; [ mosh ];
|
|
|
|
networking.firewall.allowedUDPPortRanges = [ { from = 60000; to = 61000; } ];
|
|
|
|
};
|
|
|
|
}
|