From 77458f6c614dc65a61852fec11b02ea46ba4ee98 Mon Sep 17 00:00:00 2001 From: punkfairie Date: Sat, 16 Nov 2024 14:20:26 -0800 Subject: [PATCH] feat(home): Curl --- homes/x86_64-linux/marley@nyx/default.nix | 1 + modules/home/programs/curl/default.nix | 38 +++++++++++++++++++++++ old/home/programs/curl.nix | 26 ---------------- 3 files changed, 39 insertions(+), 26 deletions(-) create mode 100644 modules/home/programs/curl/default.nix delete mode 100644 old/home/programs/curl.nix diff --git a/homes/x86_64-linux/marley@nyx/default.nix b/homes/x86_64-linux/marley@nyx/default.nix index 22a1263..e6aad8e 100644 --- a/homes/x86_64-linux/marley@nyx/default.nix +++ b/homes/x86_64-linux/marley@nyx/default.nix @@ -19,6 +19,7 @@ in btop = enabled; cava = enabled; cheat = enabled; + curl = enabled; fish = enabled; journalctl = enabled; neo = enabled; diff --git a/modules/home/programs/curl/default.nix b/modules/home/programs/curl/default.nix new file mode 100644 index 0000000..9060631 --- /dev/null +++ b/modules/home/programs/curl/default.nix @@ -0,0 +1,38 @@ +{ + lib, + config, + namespace, + pkgs, + ... +}: +let + inherit (lib) mkIf; + inherit (lib.${namespace}) mkEnableModule; + + cfg = config.${namespace}.programs.curl; +in +{ + options = mkEnableModule "programs.curl"; + + 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)" + ''; + + }; +} diff --git a/old/home/programs/curl.nix b/old/home/programs/curl.nix deleted file mode 100644 index b345d85..0000000 --- a/old/home/programs/curl.nix +++ /dev/null @@ -1,26 +0,0 @@ -{ pkgs, ... }: -{ - home.packages = with pkgs; [ - curl - ]; - - xdg.configFile.".curlrc" = { - enable = true; - 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)" - ''; - }; -}