add font and sudo config

This commit is contained in:
Alexander Navarro 2024-11-19 16:47:12 -03:00
parent 76e89bf33c
commit 82f734ad0c
3 changed files with 28 additions and 1 deletions

View file

@ -7,6 +7,15 @@
{{ header "Running pre deploy script for distro" (to_title_case distro) }}
{{ #if (and dotter.packages.cli (is_executable "sudo")) }}
{{ header "Configuring sudo" }}
echo "Defaults pwfeedback" | sudo -B tee /etc/sudoers.d/01-user
echo "Defaults timestamp_timeout=10" | sudo -B tee -a /etc/sudoers.d/01-user
echo "Defaults timestamp_type=global" | sudo -B tee -a /etc/sudoers.d/01-user
{{ /if }}
{{#if (eq distro "fedora") ~}}
{{! extract the copr repositories variable }}
@ -40,4 +49,19 @@ cargo install --locked {{# each cargo.packages }} "{{ this }}" {{ /each }}
{{ /if }}
{{ #if dotter.packages.cli }}
{{ header "Configuring Nerd Fonts" }}
FONT_DIR="$HOME/.local/share/fonts"
mkdir -p "$FONT_DIR"
tmp_dir=$(mktemp -d)
curl -L https://github.com/ryanoasis/nerd-fonts/releases/latest/download/{{ nerd_font }}.zip -o "$tmp_dir/{{ nerd_font}}.zip"
unzip -o "$tmp_dir/{{nerd_font}}.zip" -d ${FONT_DIR}/{{ nerd_font }}
rm -rf "$tmp_dir"
{{ /if }}
{{ header "Done :3" }}