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

25 lines
705 B
Nix

{ config, pkgs, lib, ... }:
let
cfg = config.local.programs.share-files;
mkShareFileOpts = name: {
enable = lib.mkEnableOption name;
package = lib.mkPackageOption pkgs name { };
};
in
{
options.local.programs.share-files = {
onionshare = mkShareFileOpts "onionshare-gui";
croc = mkShareFileOpts "croc";
};
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
# Easily and securely send things from one computer to another
++ lib.optional cfg.croc.enable cfg.croc.package;
}