From 1f47b2c4456d7acd233f268b7fe2ae09fa73c792 Mon Sep 17 00:00:00 2001 From: punkfairie Date: Sun, 3 Nov 2024 09:45:30 -0800 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=20refactor(curlrc):=20Seperate=20file?= =?UTF-8?q?=20->=20inline=20text?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- home/curl/.curlrc | 11 ----------- home/curl/default.nix | 16 +++++++++++++++- 2 files changed, 15 insertions(+), 12 deletions(-) delete mode 100644 home/curl/.curlrc diff --git a/home/curl/.curlrc b/home/curl/.curlrc deleted file mode 100644 index d83a650..0000000 --- a/home/curl/.curlrc +++ /dev/null @@ -1,11 +0,0 @@ -# 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)" diff --git a/home/curl/default.nix b/home/curl/default.nix index 4884495..b345d85 100644 --- a/home/curl/default.nix +++ b/home/curl/default.nix @@ -6,7 +6,21 @@ xdg.configFile.".curlrc" = { enable = true; - source = ./.curlrc; target = ".curlrc"; + + text = # conf + '' + # 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)" + ''; }; }