From 01f4b0694f2ce0329144c98006a5033a441aabb8 Mon Sep 17 00:00:00 2001 From: Marko Korhonen Date: Wed, 18 Jun 2025 10:51:30 -0500 Subject: [PATCH 1/2] Add update download timer for Moria --- config-root.toml | 10 ++++++++++ home/.config/zsh/04-aliases.zsh | 2 +- root/etc/systemd/system/pacman-download.service | 8 ++++++++ root/etc/systemd/system/pacman-download.timer | 10 ++++++++++ 4 files changed, 29 insertions(+), 1 deletion(-) create mode 100755 root/etc/systemd/system/pacman-download.service create mode 100644 root/etc/systemd/system/pacman-download.timer diff --git a/config-root.toml b/config-root.toml index 0faab602..8b1c9b4e 100644 --- a/config-root.toml +++ b/config-root.toml @@ -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] diff --git a/home/.config/zsh/04-aliases.zsh b/home/.config/zsh/04-aliases.zsh index 427e8a3d..687116c5 100644 --- a/home/.config/zsh/04-aliases.zsh +++ b/home/.config/zsh/04-aliases.zsh @@ -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" @@%} diff --git a/root/etc/systemd/system/pacman-download.service b/root/etc/systemd/system/pacman-download.service new file mode 100755 index 00000000..5bef182c --- /dev/null +++ b/root/etc/systemd/system/pacman-download.service @@ -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 diff --git a/root/etc/systemd/system/pacman-download.timer b/root/etc/systemd/system/pacman-download.timer new file mode 100644 index 00000000..13b84350 --- /dev/null +++ b/root/etc/systemd/system/pacman-download.timer @@ -0,0 +1,10 @@ +[Unit] +Description=Hourly pacman update download with random minute + +[Timer] +OnCalendar=hourly +RandomizedDelaySec=3600 +Persistent=true + +[Install] +WantedBy=timers.target From 0a71eaa97e22de52df357ae3e94fdbfa70c8fcaf Mon Sep 17 00:00:00 2001 From: Marko Korhonen Date: Wed, 18 Jun 2025 10:51:50 -0500 Subject: [PATCH 2/2] Postgres: add env file --- docker/postgres/docker-compose.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/docker/postgres/docker-compose.yaml b/docker/postgres/docker-compose.yaml index f51c542f..29175029 100644 --- a/docker/postgres/docker-compose.yaml +++ b/docker/postgres/docker-compose.yaml @@ -8,6 +8,7 @@ services: - 127.0.0.1:5432:5432 networks: - postgres + env_file: .env volumes: - /etc/localtime:/etc/localtime:ro - data:/var/lib/postgresql/data