at 16.09-beta 484 B view raw
1{ config, lib, pkgs, ... }: 2 3with lib; 4 5let 6 7 cfg = config.programs.mosh; 8 9in 10{ 11 options.programs.mosh = { 12 enable = mkOption { 13 description = '' 14 Whether to enable mosh. Note, this will open ports in your firewall! 15 ''; 16 default = false; 17 example = true; 18 type = lib.types.bool; 19 }; 20 }; 21 22 config = mkIf cfg.enable { 23 environment.systemPackages = with pkgs; [ mosh ]; 24 networking.firewall.allowedUDPPortRanges = [ { from = 60000; to = 61000; } ]; 25 }; 26}