Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

containers: sync podman with docker #180

Merged
merged 2 commits into from
Dec 15, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 "use virtualisation.docker.aggressiveAutoPrune")
SuperSandro2000 marked this conversation as resolved.
Show resolved Hide resolved
];

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
Loading