nixos/containers: move storage.settings default into config

This avoids having to use workarounds like the following to retain the
default settings which podman requires to run.

virtualisation.containers.storage.settings = lib.recursiveUpdate options.virtualisation.containers.storage.settings.default {
  storage.options.mount_program = lib.getExe pkgs.fuse-overlayfs;
};
This commit is contained in:
Sandro Jäckel 2024-04-28 17:55:56 +02:00
parent 2058a82fb0
commit aaa86f2926
No known key found for this signature in database
GPG Key ID: 3AF5A43A3EECC2E5

View File

@ -53,13 +53,6 @@ in
storage.settings = mkOption {
type = toml.type;
default = {
storage = {
driver = "overlay";
graphroot = "/var/lib/containers/storage";
runroot = "/run/containers/storage";
};
};
description = "storage.conf configuration";
};
@ -124,6 +117,12 @@ in
};
};
virtualisation.containers.storage.settings.storage = {
driver = "overlay";
graphroot = "/var/lib/containers/storage";
runroot = "/run/containers/storage";
};
environment.etc = {
"containers/containers.conf".source =
toml.generate "containers.conf" cfg.containersConf.settings;