2024-04-16 02:51:46 +03:00
|
|
|
{ config, pkgs, lib, ... }:
|
|
|
|
|
|
|
|
let
|
|
|
|
cfg = config.local.programs.share-files;
|
2024-05-21 19:10:20 +03:00
|
|
|
|
|
|
|
mkShareFileOpts = name: {
|
|
|
|
enable = lib.mkEnableOption name;
|
|
|
|
package = lib.mkPackageOption pkgs name { };
|
|
|
|
};
|
2024-04-16 02:51:46 +03:00
|
|
|
in
|
|
|
|
{
|
2024-05-21 19:10:20 +03:00
|
|
|
options.local.programs.share-files = {
|
2024-05-21 20:52:48 +03:00
|
|
|
onionshare = mkShareFileOpts "onionshare-gui";
|
|
|
|
croc = mkShareFileOpts "croc";
|
2024-04-16 02:51:46 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
config.home.packages =
|
|
|
|
# OnionShare is an open-source tool that lets you securely and anonymously share files,
|
|
|
|
# host websites, and chat with friends using the Tor network.
|
2024-05-21 19:10:20 +03:00
|
|
|
lib.optional cfg.onionshare.enable cfg.onionshare.package
|
2024-04-16 02:51:46 +03:00
|
|
|
|
|
|
|
# Easily and securely send things from one computer to another
|
2024-05-21 19:10:20 +03:00
|
|
|
++ lib.optional cfg.croc.enable cfg.croc.package;
|
2024-04-16 02:51:46 +03:00
|
|
|
|
|
|
|
}
|