mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 06:53:01 +00:00
nixos/localsend: add package option
This commit is contained in:
parent
7bdd525de2
commit
9ac4777d98
@ -12,13 +12,17 @@ in
|
||||
options.programs.localsend = {
|
||||
enable = lib.mkEnableOption "localsend, an open source cross-platform alternative to AirDrop";
|
||||
|
||||
openFirewall = lib.mkEnableOption "opening the firewall port ${toString firewallPort} for receiving files" // {
|
||||
default = true;
|
||||
};
|
||||
package = lib.mkPackageOption pkgs "localsend" { };
|
||||
|
||||
openFirewall =
|
||||
lib.mkEnableOption "opening the firewall port ${toString firewallPort} for receiving files"
|
||||
// {
|
||||
default = true;
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.systemPackages = [ pkgs.localsend ];
|
||||
environment.systemPackages = [ cfg.package ];
|
||||
networking.firewall.allowedTCPPorts = lib.optionals cfg.openFirewall [ firewallPort ];
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user