From 3e2199a72887ad07e7ccc36e2052efee24a41f4e Mon Sep 17 00:00:00 2001 From: punkfairie Date: Sun, 3 Nov 2024 10:16:25 -0800 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=20refactor(wget):=20wgetrc=20->=20def?= =?UTF-8?q?ault.nix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- home/wget/default.nix | 24 ++++++++++++++++++++++-- home/wget/wgetrc | 18 ------------------ 2 files changed, 22 insertions(+), 20 deletions(-) delete mode 100644 home/wget/wgetrc diff --git a/home/wget/default.nix b/home/wget/default.nix index fbe06e7..57d6960 100644 --- a/home/wget/default.nix +++ b/home/wget/default.nix @@ -11,8 +11,28 @@ xdg.configFile."wgetrc" = { enable = true; - source = ./wgetrc; - target = "wgetrc"; + + text = # wget + '' + # Use the server-provided last modification date, if available. + timestamping = on + + # Wait 60 seconds before timing out. + timeout = 60 + + # Retry a few times when a download fails, but don't overdo it (the default is + # 20!). + tries = 3 + + # Retry even when the connection was refused. + retry_connrefused = on + + # Use the last component of a redirection URL for the local file name. + trust_server_names = on + + # Disguise as IE 9 on Windows 7. + user_agent = Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0) + ''; }; home.sessionVariables = lib.mkIf config.home.preferXdgDirectories { diff --git a/home/wget/wgetrc b/home/wget/wgetrc deleted file mode 100644 index 0ba8ac2..0000000 --- a/home/wget/wgetrc +++ /dev/null @@ -1,18 +0,0 @@ -# Use the server-provided last modification date, if available. -timestamping = on - -# Wait 60 seconds before timing out. -timeout = 60 - -# Retry a few times when a download fails, but don't overdo it (the default is -# 20!). -tries = 3 - -# Retry even when the connection was refused. -retry_connrefused = on - -# Use the last component of a redirection URL for the local file name. -trust_server_names = on - -# Disguise as IE 9 on Windows 7 -user_agent = Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)