{ lib, config, pkgs, ... }: let inherit (lib) mkIf mkOption types; in { options.smayzy.tor.enable = mkOption { type = types.bool; default = false; description = "tor"; }; config = mkIf config.smayzy.tor.enable { environment.systemPackages = with pkgs; [ tor tor-browser ]; services.tor.enable = true; }; }