From 9d9dba2cc224e39f492d9d9e33bde2fecaf65937 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Wed, 7 Feb 2024 20:17:46 +0000 Subject: [PATCH] home: add wget This is mostly so that I can add the XDG-compliant configuration. --- modules/home/default.nix | 1 + modules/home/wget/default.nix | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 modules/home/wget/default.nix diff --git a/modules/home/default.nix b/modules/home/default.nix index 4dcfc35..c8183cf 100644 --- a/modules/home/default.nix +++ b/modules/home/default.nix @@ -39,6 +39,7 @@ ./tmux ./udiskie ./vim + ./wget ./wm ./x ./xdg diff --git a/modules/home/wget/default.nix b/modules/home/wget/default.nix new file mode 100644 index 0000000..32c13c0 --- /dev/null +++ b/modules/home/wget/default.nix @@ -0,0 +1,26 @@ +{ config, pkgs, lib, ... }: +let + cfg = config.my.home.wget; +in +{ + options.my.home.wget = with lib; { + enable = my.mkDisableOption "wget configuration"; + + package = mkPackageOption pkgs "wget" { }; + }; + + config = lib.mkIf cfg.enable { + home.packages = [ + cfg.package + ]; + + + home.sessionVariables = lib.mkIf cfg.enable { + WGETRC = "${config.xdg.configHome}/wgetrc"; + }; + + xdg.configFile."wgetrc".text = '' + hsts-file = ${config.xdg.dataHome}/wget-hsts + ''; + }; +}