nixos/docker: move live-restore option into daemon.settings

Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
This commit is contained in:
Sefa Eyeoglu 2024-10-16 10:47:04 +02:00
parent 9d26556575
commit 5900b644bb
No known key found for this signature in database
GPG Key ID: E13DFD4B47127951

View File

@ -52,7 +52,19 @@ in
daemon.settings =
mkOption {
type = settingsFormat.type;
type = types.submodule {
freeformType = settingsFormat.type;
options = {
live-restore = mkOption {
type = types.bool;
default = true;
description = ''
Allow dockerd to be restarted without affecting running container.
This option is incompatible with docker swarm.
'';
};
};
};
default = { };
example = {
ipv6 = true;
@ -75,16 +87,6 @@ in
'';
};
liveRestore =
mkOption {
type = types.bool;
default = true;
description = ''
Allow dockerd to be restarted without affecting running container.
This option is incompatible with docker swarm.
'';
};
storageDriver =
mkOption {
type = types.nullOr (types.enum ["aufs" "btrfs" "devicemapper" "overlay" "overlay2" "zfs"]);
@ -253,7 +255,6 @@ in
hosts = [ "fd://" ];
log-driver = mkDefault cfg.logDriver;
storage-driver = mkIf (cfg.storageDriver != null) (mkDefault cfg.storageDriver);
live-restore = mkDefault cfg.liveRestore;
runtimes = mkIf cfg.enableNvidia {
nvidia = {
# Use the legacy nvidia-container-runtime wrapper to allow
@ -269,6 +270,7 @@ in
imports = [
(mkRemovedOptionModule ["virtualisation" "docker" "socketActivation"] "This option was removed and socket activation is now always active")
(mkAliasOptionModule ["virtualisation" "docker" "liveRestore"] ["virtualisation" "docker" "daemon" "settings" "live-restore"])
];
}