mosh program: init

+27
+1
nixos/modules/module-list.nix
··· 71 71 ./programs/kbdlight.nix 72 72 ./programs/light.nix 73 73 ./programs/man.nix 74 + ./programs/mosh.nix 74 75 ./programs/nano.nix 75 76 ./programs/screen.nix 76 77 ./programs/shadow.nix
+26
nixos/modules/programs/mosh.nix
··· 1 + { config, lib, pkgs, ... }: 2 + 3 + with lib; 4 + 5 + let 6 + 7 + cfg = config.programs.mosh; 8 + 9 + in 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 + }