Merge pull request #14212 from aneeshusa/add-mosh-service
mosh service: init
This commit is contained in:
commit
850ffee9fa
@ -71,6 +71,7 @@
|
||||
./programs/kbdlight.nix
|
||||
./programs/light.nix
|
||||
./programs/man.nix
|
||||
./programs/mosh.nix
|
||||
./programs/nano.nix
|
||||
./programs/screen.nix
|
||||
./programs/shadow.nix
|
||||
|
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…
Reference in New Issue
Block a user