nixos/containers: add storage.conf

This commit is contained in:
Edward Tjörnhammar 2021-06-01 13:14:15 +02:00 committed by zowoq
parent 155ae682a5
commit afdb5675a1

View file

@ -65,6 +65,18 @@ in
'';
};
storage.settings = mkOption {
type = toml.type;
default = {
storage = {
driver = "overlay";
graphroot = "/var/lib/containers/storage";
runroot = "/run/containers/storage";
};
};
description = "storage.conf configuration";
};
registries = {
search = mkOption {
type = types.listOf types.str;
@ -129,6 +141,9 @@ in
environment.etc."containers/containers.conf".source =
toml.generate "containers.conf" cfg.containersConf.settings;
environment.etc."containers/storage.conf".source =
toml.generate "storage.conf" cfg.storage.settings;
environment.etc."containers/registries.conf".source = toml.generate "registries.conf" {
registries = lib.mapAttrs (n: v: { registries = v; }) cfg.registries;
};