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