2024-11-16 14:20:26 -08:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
config,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}:
|
|
|
|
let
|
2024-11-16 23:29:38 -08:00
|
|
|
inherit (lib) mkEnableOption mkIf;
|
2024-11-16 14:20:26 -08:00
|
|
|
|
2024-11-16 22:34:40 -08:00
|
|
|
cfg = config.marleyos.programs.curl;
|
2024-11-16 14:20:26 -08:00
|
|
|
in
|
|
|
|
{
|
2024-11-16 23:29:38 -08:00
|
|
|
options.marleyos.programs.curl = mkEnableOption "curl";
|
2024-11-16 14:20:26 -08:00
|
|
|
|
|
|
|
config = 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)"
|
|
|
|
'';
|
|
|
|
|
|
|
|
};
|
|
|
|
}
|