mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-12 20:55:31 +03:00
nixos/mosh: make package overridable (#383643)
This commit is contained in:
parent
4f2c917ec5
commit
8ed94b5b43
1 changed files with 2 additions and 1 deletions
|
@ -13,6 +13,7 @@ in
|
||||||
{
|
{
|
||||||
options.programs.mosh = {
|
options.programs.mosh = {
|
||||||
enable = lib.mkEnableOption "mosh";
|
enable = lib.mkEnableOption "mosh";
|
||||||
|
package = lib.mkPackageOption pkgs "mosh" { };
|
||||||
openFirewall = lib.mkEnableOption "" // {
|
openFirewall = lib.mkEnableOption "" // {
|
||||||
description = "Whether to automatically open the necessary ports in the firewall.";
|
description = "Whether to automatically open the necessary ports in the firewall.";
|
||||||
default = true;
|
default = true;
|
||||||
|
@ -29,7 +30,7 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
environment.systemPackages = [ pkgs.mosh ];
|
environment.systemPackages = [ cfg.package ];
|
||||||
networking.firewall.allowedUDPPortRanges = lib.optional cfg.openFirewall {
|
networking.firewall.allowedUDPPortRanges = lib.optional cfg.openFirewall {
|
||||||
from = 60000;
|
from = 60000;
|
||||||
to = 61000;
|
to = 61000;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue