system/modules/home-manager/programs/share-files.nix

26 lines
705 B
Nix
Raw Normal View History

2024-04-16 02:51:46 +03:00
{ config, pkgs, lib, ... }:
let
cfg = config.local.programs.share-files;
mkShareFileOpts = name: {
enable = lib.mkEnableOption name;
package = lib.mkPackageOption pkgs name { };
};
2024-04-16 02:51:46 +03:00
in
{
options.local.programs.share-files = {
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.
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
++ lib.optional cfg.croc.enable cfg.croc.package;
2024-04-16 02:51:46 +03:00
}