nixos/mosh: make package overridable (#383643)

This commit is contained in:
Henri Menke 2025-02-20 14:19:45 +01:00 committed by GitHub
parent 4f2c917ec5
commit 8ed94b5b43
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -13,6 +13,7 @@ in
{
options.programs.mosh = {
enable = lib.mkEnableOption "mosh";
package = lib.mkPackageOption pkgs "mosh" { };
openFirewall = lib.mkEnableOption "" // {
description = "Whether to automatically open the necessary ports in the firewall.";
default = true;
@ -29,7 +30,7 @@ in
};
config = lib.mkIf cfg.enable {
environment.systemPackages = [ pkgs.mosh ];
environment.systemPackages = [ cfg.package ];
networking.firewall.allowedUDPPortRanges = lib.optional cfg.openFirewall {
from = 60000;
to = 61000;