Skip to content

Commit

Permalink
containers: sync podman with docker (#180)
Browse files Browse the repository at this point in the history
* containers: sync podman with docker

* Update modules/containers.nix

---------

Co-authored-by: Sandro <[email protected]>
  • Loading branch information
MarcelCoding and SuperSandro2000 authored Dec 15, 2024
1 parent 4f9ff35 commit c95f124
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions modules/containers.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,15 @@ in
recommendedDefaults = libS.mkOpinionatedOption "set recommended and maintenance reducing default settings";
};

podman.recommendedDefaults = libS.mkOpinionatedOption "set recommended and maintenance reducing default settings";
podman = {
aggressiveAutoPrune = libS.mkOpinionatedOption "configure aggressive auto pruning which removes everything unreferenced by running containers. This includes named volumes and mounts should be used instead";

recommendedDefaults = libS.mkOpinionatedOption "set recommended and maintenance reducing default settings";
};
};

imports = [
(lib.mkRenamedOptionModule ["virtualisation" "docker" "aggresiveAutoPrune"] ["virtualisation" "docker" "aggressiveAutoPrune"])
(lib.mkRemovedOptionModule ["virtualisation" "docker" "aggresiveAutoPrune"] "use virtualisation.docker.aggressiveAutoPrune")
];

config = {
Expand Down Expand Up @@ -54,8 +58,8 @@ in
};

podman = {
autoPrune = {
enable = lib.mkIf cfgp.recommendedDefaults true;
autoPrune = lib.mkIf cfgp.aggressiveAutoPrune {
enable = true;
flags = autoPruneFlags;
};
defaultNetwork.settings.dns_enabled = lib.mkIf cfgp.recommendedDefaults true;
Expand Down

0 comments on commit c95f124

Please sign in to comment.