diff --git a/nixos/modules/virtualisation/containers.nix b/nixos/modules/virtualisation/containers.nix index 45d4f877ae5b..84824e2f90f0 100644 --- a/nixos/modules/virtualisation/containers.nix +++ b/nixos/modules/virtualisation/containers.nix @@ -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; };