feat(home): Curl
This commit is contained in:
parent
8dd10cdeb3
commit
77458f6c61
3 changed files with 39 additions and 26 deletions
|
@ -19,6 +19,7 @@ in
|
|||
btop = enabled;
|
||||
cava = enabled;
|
||||
cheat = enabled;
|
||||
curl = enabled;
|
||||
fish = enabled;
|
||||
journalctl = enabled;
|
||||
neo = enabled;
|
||||
|
|
38
modules/home/programs/curl/default.nix
Normal file
38
modules/home/programs/curl/default.nix
Normal file
|
@ -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)"
|
||||
'';
|
||||
|
||||
};
|
||||
}
|
|
@ -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)"
|
||||
'';
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue