Add magic-update-script to pull container images
This commit is contained in:
parent
074d164e95
commit
5da7dbabfb
1 changed files with 14 additions and 0 deletions
|
|
@ -310,6 +310,7 @@
|
||||||
|
|
||||||
ignoreregex =
|
ignoreregex =
|
||||||
'';
|
'';
|
||||||
|
|
||||||
environment.etc."fail2ban/filter.d/forgejo.local".text = ''
|
environment.etc."fail2ban/filter.d/forgejo.local".text = ''
|
||||||
[Definition]
|
[Definition]
|
||||||
# Matches: ... Failed login attempt for user ... from ip address <HOST>
|
# Matches: ... Failed login attempt for user ... from ip address <HOST>
|
||||||
|
|
@ -319,6 +320,19 @@
|
||||||
ignoreregex =
|
ignoreregex =
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
environment.etc."magic-update-script.sh".text = ''
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
echo "Pulling latest container images..."
|
||||||
|
|
||||||
|
${lib.concatMapStringsSep "\n" (name:
|
||||||
|
"docker pull ${config.virtualisation.oci-containers.containers.${name}.image}"
|
||||||
|
) (builtins.attrNames config.virtualisation.oci-containers.containers)}
|
||||||
|
|
||||||
|
echo "All images updated successfully!"
|
||||||
|
'';
|
||||||
|
|
||||||
# Virtualisation
|
# Virtualisation
|
||||||
virtualisation = {
|
virtualisation = {
|
||||||
containers.enable = true;
|
containers.enable = true;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue