diff options
author | Aneesh Agrawal <aneeshusa@gmail.com> | 2016-03-26 03:22:52 +0000 |
---|---|---|
committer | Aneesh Agrawal <aneeshusa@gmail.com> | 2016-04-18 06:31:11 +0000 |
commit | 77a4bd1a58fbc6e78fc9d57bd3996d0f6ac42111 (patch) | |
tree | a79e10338383e0e13e05b1d44c469140634bbfe5 | |
parent | 99fd109a8588eaf5d5928d47cac0482f0b1a126e (diff) | |
download | nixlib-77a4bd1a58fbc6e78fc9d57bd3996d0f6ac42111.tar nixlib-77a4bd1a58fbc6e78fc9d57bd3996d0f6ac42111.tar.gz nixlib-77a4bd1a58fbc6e78fc9d57bd3996d0f6ac42111.tar.bz2 nixlib-77a4bd1a58fbc6e78fc9d57bd3996d0f6ac42111.tar.lz nixlib-77a4bd1a58fbc6e78fc9d57bd3996d0f6ac42111.tar.xz nixlib-77a4bd1a58fbc6e78fc9d57bd3996d0f6ac42111.tar.zst nixlib-77a4bd1a58fbc6e78fc9d57bd3996d0f6ac42111.zip |
mosh program: init
-rw-r--r-- | nixos/modules/module-list.nix | 1 | ||||
-rw-r--r-- | nixos/modules/programs/mosh.nix | 26 |
2 files changed, 27 insertions, 0 deletions
diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 41b60773a70b..bb8fa48105ac 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -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 diff --git a/nixos/modules/programs/mosh.nix b/nixos/modules/programs/mosh.nix new file mode 100644 index 000000000000..b478f8e180fa --- /dev/null +++ b/nixos/modules/programs/mosh.nix @@ -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; } ]; + }; +} |