marleyos/modules/home/programs/curl.nix
2025-05-26 19:04:40 -07:00

37 lines
738 B
Nix

{
marleylib,
config,
osConfig,
lib,
pkgs,
...
}: let
inherit (marleylib.module) mkEnableOption';
cfg = config.marleyos.programs.curl;
osCfg = osConfig.marleyos.programs.curl;
in {
options.marleyos.programs.curl.enable = mkEnableOption' "curl" osCfg.enable;
config = lib.mkIf cfg.enable {
home.packages = with pkgs; [
curl
];
xdg.configFile.".curlrc".text =
# ini
''
# Limit the timeout in seconds.
connect-timeout = 60
# Follow HTTP redirects.
location
# Show error messages.
show-error
# Disguise as IE 9 on Windows 7.
user-agent = "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)"
'';
};
}