docker: add script to fix firewall settings periodically

This commit is contained in:
Leonardo Eugênio 2025-07-11 14:05:02 -03:00
parent 960d6a87a5
commit 1ae76003c4
No known key found for this signature in database
GPG key ID: 2F8F21CE8721456B

View file

@ -33,6 +33,18 @@
networking.firewall.extraCommands = lib.getExe pkgs._docker-block-external-connections; networking.firewall.extraCommands = lib.getExe pkgs._docker-block-external-connections;
# Docker punches holes in your firewall
systemd.services.docker-update-firewall = {
script = lib.getExe pkgs._docker-block-external-connections;
};
systemd.timers.docker-update-firewall = {
timerConfig = {
OnCalendar = "minutely";
Unit = "docker-update-firewall.service";
};
wantedBy = [ "multi-user.target" ];
};
programs.extra-container.enable = true; programs.extra-container.enable = true;
programs.firejail.enable = true; programs.firejail.enable = true;