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 + ''; + }; +}