about summary refs log tree commit diff
path: root/nixos/modules/virtualisation/docker.nix
diff options
context:
space:
mode:
authorVictor Buttner <victor@0x23.dk>2023-05-05 14:23:34 +0200
committerVictor Buttner <victor@0x23.dk>2023-06-02 15:45:55 +0200
commit4f1ccb7fc58e83d9cf7f92e820c7ecaba2801982 (patch)
treeabcad7459294171b098c530e1344248b271cf607 /nixos/modules/virtualisation/docker.nix
parent3e313808bd2e0a0669430787fb22e43b2f4bf8bf (diff)
nixos/docker: add extraPackages option
This permits easier use of some features, e.g. docker checkpoint.
Diffstat (limited to 'nixos/modules/virtualisation/docker.nix')
-rw-r--r--nixos/modules/virtualisation/docker.nix12
1 files changed, 11 insertions, 1 deletions
diff --git a/nixos/modules/virtualisation/docker.nix b/nixos/modules/virtualisation/docker.nix
index 046b8e2f79010..20f47a76c87b9 100644
--- a/nixos/modules/virtualisation/docker.nix
+++ b/nixos/modules/virtualisation/docker.nix
@@ -158,6 +158,15 @@ in
         Docker package to be used in the module.
       '';
     };
+
+    extraPackages = mkOption {
+      type = types.listOf types.package;
+      default = [ ];
+      example = literalExpression "with pkgs; [ criu ]";
+      description = lib.mdDoc ''
+        Extra packages to add to PATH for the docker daemon process.
+      '';
+    };
   };
 
   ###### implementation
@@ -194,7 +203,8 @@ in
         };
 
         path = [ pkgs.kmod ] ++ optional (cfg.storageDriver == "zfs") pkgs.zfs
-          ++ optional cfg.enableNvidia pkgs.nvidia-docker;
+          ++ optional cfg.enableNvidia pkgs.nvidia-docker
+          ++ cfg.extraPackages;
       };
 
       systemd.sockets.docker = {