feat(home): wget

This commit is contained in:
punkfairie 2024-11-16 21:13:07 -08:00
parent 4f2b6749ff
commit 23828a12bb
Signed by: punkfairie
GPG key ID: A509E8F77FB9D696
2 changed files with 18 additions and 10 deletions

View file

@ -46,6 +46,7 @@ in
systemctl = enabled; systemctl = enabled;
tmux = enabled; tmux = enabled;
wezterm = enabled; wezterm = enabled;
wget = enabled;
}; };
xorg = { xorg = {
xsession = enabled; xsession = enabled;

View file

@ -1,18 +1,25 @@
{ {
pkgs,
lib, lib,
config, config,
namespace,
pkgs,
... ...
}: }:
let
inherit (lib) mkIf;
inherit (lib.${namespace}) mkEnableModule;
cfg = config.${namespace}.programs.wget;
in
{ {
home.packages = with pkgs; [ options = mkEnableModule "programs.wget";
wget
];
xdg.configFile."wgetrc" = { config = mkIf cfg.enable {
enable = true; home.packages = with pkgs; [
wget
];
text = # wget xdg.configFile."wgetrc".text = # wget
'' ''
# Use the server-provided last modification date, if available. # Use the server-provided last modification date, if available.
timestamping = on timestamping = on
@ -33,9 +40,9 @@
# Disguise as IE 9 on Windows 7. # Disguise as IE 9 on Windows 7.
user_agent = Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0) user_agent = Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)
''; '';
};
home.sessionVariables = lib.mkIf config.home.preferXdgDirectories { home.sessionVariables = lib.mkIf config.home.preferXdgDirectories {
WGETRC = "${config.xdg.configHome}/wgetrc"; WGETRC = "${config.xdg.configHome}/wgetrc";
};
}; };
} }