nixos/sharing: init

Co-Authored-By: fee1-dead <ent3rm4n@gmail.com>
This commit is contained in:
ChaosAttractor 2023-01-09 13:17:59 +08:00 committed by pennae
parent 4f706834c9
commit b0e773adde
4 changed files with 31 additions and 0 deletions

View File

@ -152,6 +152,15 @@
are met, or not met.
</para>
</listitem>
<listitem>
<para>
<link xlink:href="https://github.com/parvardegr/sharing">sharing</link>,
a command-line tool to share directories and files from the
CLI to iOS and Android devices without the need of an extra
client app. Available as
<link linkend="opt-programs.sharing.enable">programs.sharing</link>.
</para>
</listitem>
</itemizedlist>
</section>
<section xml:id="sec-release-23.05-incompatibilities">

View File

@ -48,6 +48,8 @@ In addition to numerous new and upgraded packages, this release has the followin
- [autosuspend](https://github.com/languitar/autosuspend), a python daemon that suspends a system if certain conditions are met, or not met.
- [sharing](https://github.com/parvardegr/sharing), a command-line tool to share directories and files from the CLI to iOS and Android devices without the need of an extra client app. Available as [programs.sharing](#opt-programs.sharing.enable).
## Backward Incompatibilities {#sec-release-23.05-incompatibilities}
<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->

View File

@ -223,6 +223,7 @@
./programs/seahorse.nix
./programs/sedutil.nix
./programs/shadow.nix
./programs/sharing.nix
./programs/singularity.nix
./programs/skim.nix
./programs/slock.nix

View File

@ -0,0 +1,19 @@
{ config, pkgs, lib, ... }:
with lib;
{
options.programs.sharing = {
enable = mkEnableOption (lib.mdDoc ''
sharing, a CLI tool for sharing files.
Note that it will opens the 7478 port for TCP in the firewall, which is needed for it to function properly
'');
};
config =
let
cfg = config.programs.sharing;
in
mkIf cfg.enable {
environment.systemPackages = [ pkgs.sharing ];
networking.firewall.allowedTCPPorts = [ 7478 ];
};
}