summaryrefslogtreecommitdiff
path: root/modules/wget.nix
diff options
context:
space:
mode:
authorAzat Bahawi <azat@bahawi.net>2024-04-21 02:15:42 +0300
committerAzat Bahawi <azat@bahawi.net>2024-04-21 02:15:42 +0300
commite6ed60548397627bf10f561f9438201dbba0a36e (patch)
treef9a84c5957d2cc4fcd148065ee9365a0c851ae1c /modules/wget.nix
parent9ac64328603d44bd272175942d3ea3eaadcabd04 (diff)
2024-04-21
Diffstat (limited to 'modules/wget.nix')
-rw-r--r--modules/wget.nix37
1 files changed, 37 insertions, 0 deletions
diff --git a/modules/wget.nix b/modules/wget.nix
new file mode 100644
index 0000000..0e8ee64
--- /dev/null
+++ b/modules/wget.nix
@@ -0,0 +1,37 @@
+{
+ config,
+ lib,
+ pkgs,
+ ...
+}:
+with lib;
+let
+ cfg = config.nixfiles.modules.wget;
+in
+{
+ options.nixfiles.modules.wget.enable = mkEnableOption "wget";
+
+ config = mkIf cfg.enable {
+ hm = {
+ programs.bash.shellAliases.wget = "wget --hsts-file=/tmp/wget-hsts";
+
+ home.sessionVariables.WGETRC = pkgs.writeText "wgetrc" ''
+ adjust_extension = on
+ dirstruct = off
+ follow_ftp = on
+ passive_ftp = off
+ progress = bar
+ quota = inf
+ reclevel = 5
+ recursive = off
+ robots = off
+ timestamping = off
+ tries = 5
+ wait = 0
+ waitretry = 10
+ '';
+ };
+
+ environment.systemPackages = with pkgs; [ wget ];
+ };
+}