From 791b600aac6e230b7d536d404516e92d10b7ca65 Mon Sep 17 00:00:00 2001 From: Casey Ransom Date: Sun, 4 Oct 2015 01:41:57 -0400 Subject: [PATCH] nixos/docker: Include ZFS commands in PATH for ZFS storagedriver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When using the ZFS storagedriver in docker, it shells out for the ZFS commands. The path configuration for the systemd task does not include ZFS, so if the driver is set to ZFS, add ZFS utilities to the PATH. This will resolve https://github.com/NixOS/nixpkgs/issues/10127 [Bjørn: prefix commit message with "nixos/docker:", remove extra space before ';'] --- nixos/modules/virtualisation/docker.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nixos/modules/virtualisation/docker.nix b/nixos/modules/virtualisation/docker.nix index 0115b972e80d..0e1b9206999b 100644 --- a/nixos/modules/virtualisation/docker.nix +++ b/nixos/modules/virtualisation/docker.nix @@ -129,7 +129,8 @@ in LimitNPROC = 1048576; } // proxy_env; - path = [ pkgs.kmod ]; + path = [ pkgs.kmod ] ++ + (if cfg.storageDriver == "zfs" then [ pkgs.zfs ] else []); environment.MODULE_DIR = "/run/current-system/kernel-modules/lib/modules"; postStart = cfg.postStart;