{ pkgs, config, lib, ... }: let cfg = config.my.wireshark; in { options.my.wireshark = { enable = lib.mkEnableOption null; }; config = lib.mkIf cfg.enable { programs.wireshark = { enable = true; package = lib.mkIf config.my.desktop.enable pkgs.wireshark; }; my.user.extraGroups = [ "wireshark" ]; }; }