mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 21:50:33 +03:00
mosh program: init
This commit is contained in:
parent
99fd109a85
commit
77a4bd1a58
2 changed files with 27 additions and 0 deletions
26
nixos/modules/programs/mosh.nix
Normal file
26
nixos/modules/programs/mosh.nix
Normal file
|
@ -0,0 +1,26 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
|
||||
cfg = config.programs.mosh;
|
||||
|
||||
in
|
||||
{
|
||||
options.programs.mosh = {
|
||||
enable = mkOption {
|
||||
description = ''
|
||||
Whether to enable mosh. Note, this will open ports in your firewall!
|
||||
'';
|
||||
default = false;
|
||||
example = true;
|
||||
type = lib.types.bool;
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [ mosh ];
|
||||
networking.firewall.allowedUDPPortRanges = [ { from = 60000; to = 61000; } ];
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue