{ config, pkgs, lib, ... }: let cfg = config.ctucxConfig.programs.networkUtilities; in { options = { ctucxConfig.programs.networkUtilities = { enable = lib.mkEnableOption "some networking related utilities"; }; }; config = lib.mkIf cfg.enable { programs.mtr.enable = (if pkgs.stdenv.isLinux then true else false); programs.traceroute.enable = (if pkgs.stdenv.isLinux then true else false); home-manager.users.katja.home = { packages = with pkgs; [ dnsutils nmap tcpdump iperf3 ] ++ (if pkgs.stdenv.isDarwin then [ mtr spoof-mac ] else [ whois macchanger ]); shellAliases = lib.mkIf pkgs.stdenv.isDarwin { mtr = "sudo mtr"; }; }; }; }