Add update download timer for Moria

This commit is contained in:
Marko Korhonen 2025-06-18 10:51:30 -05:00
parent b23b617b95
commit 01f4b0694f
Signed by: FunctionalHacker
GPG key ID: A7F78BCB859CD890
4 changed files with 29 additions and 1 deletions

View file

@ -86,6 +86,14 @@ src = "etc/pacman.conf"
dst = "/etc/pacman.d/hooks/zsh.hook"
src = "etc/pacman.d/hooks/zsh.hook"
[dotfiles."f_pacman-download.service"]
dst = "/etc/systemd/system/pacman-download.service"
src = "etc/systemd/system/pacman-download.service"
[dotfiles."f_pacman-download.timer"]
dst = "/etc/systemd/system/pacman-download.timer"
src = "etc/systemd/system/pacman-download.timer"
[dotfiles."f_plymouthd.conf"]
src = "etc/plymouth/plymouthd.conf"
dst = "/etc/plymouth/plymouthd.conf"
@ -177,6 +185,8 @@ dotfiles = [
"f_pacman_zsh_hook",
"f_pacserve.service.conf",
"f_sudoers_pacman",
"f_pacman-download.service",
"f_pacman-download.timer",
]
[profiles.Mirkwood]

View file

@ -197,7 +197,7 @@ update() {
packages() {
{%@@ if distro_id == "arch" @@%}
paru -Syu --noconfirm
paru -S{%@@ if profile != "Moria" @@%}y{%@@ endif @@%}u --noconfirm
{%@@ elif distro_id == "ubuntu" or distro_id == "debian" @@%}
doas apt update && doas apt full-upgrade -y && doas apt autoremove -y && doas apt autoclean -y
{%@@ elif distro_id == "termux" @@%}

View file

@ -0,0 +1,8 @@
[Unit]
Description=Download updates with pacman
After=network-online.target
Wants=network-online.target
[Service]
Type=oneshot
ExecStart=pacman -Syuw --noconfirm

View file

@ -0,0 +1,10 @@
[Unit]
Description=Hourly pacman update download with random minute
[Timer]
OnCalendar=hourly
RandomizedDelaySec=3600
Persistent=true
[Install]
WantedBy=timers.target