{ config, lib, pkgs, ... }: with lib; let cfg = config.nixfiles.modules.wget; in { options.nixfiles.modules.wget.enable = mkEnableOption "wget"; config = mkIf cfg.enable { hm = { home.file.".wgetrc".text = '' adjust_extension = on dirstruct = off follow_ftp = on passive_ftp = off progress = bar quota = inf reclevel = 5 recursive = off robots = off timestamping = off tries = 5 wait = 0 waitretry = 10 ''; programs.bash.shellAliases.wget = "${pkgs.wget}/bin/wget --hsts-file=${config.hm.xdg.cacheHome}/wget-hsts"; }; environment.systemPackages = with pkgs; [wget]; }; }