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;
tmux = enabled;
wezterm = enabled;
wget = enabled;
};
xorg = {
xsession = enabled;

View file

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