summaryrefslogtreecommitdiffstats
path: root/nixos/modules/virtualisation
diff options
context:
space:
mode:
authorRagnar Dahlén <r.dahlen@gmail.com>2015-09-04 00:18:19 +0100
committerRagnar Dahlén <r.dahlen@gmail.com>2015-09-04 00:23:38 +0100
commit9bfe92ecee3359576093cfb534adbec13dcbd580 (patch)
tree7ed3f742aaf4cb645c28d0172f3a83687a1c6043 /nixos/modules/virtualisation
parent66429fa043cd9e2a92ab855a3c16b5b34168ca0c (diff)
docker: Minor improvements, fix failing test
- Replace usage of deprecated CLI flag `--daemon` - Introduce `storageDriver` option for module - Fix failing test by using `overlay` storage driver
Diffstat (limited to 'nixos/modules/virtualisation')
-rw-r--r--nixos/modules/virtualisation/docker.nix15
1 files changed, 13 insertions, 2 deletions
diff --git a/nixos/modules/virtualisation/docker.nix b/nixos/modules/virtualisation/docker.nix
index 2339cf7c6490..ba078cc0a11f 100644
--- a/nixos/modules/virtualisation/docker.nix
+++ b/nixos/modules/virtualisation/docker.nix
@@ -43,6 +43,17 @@ in
in future. So set this option explicitly to false if you wish.
'';
};
+ storageDriver =
+ mkOption {
+ type = types.enum ["aufs" "btrfs" "devicemapper" "overlay" "zfs"];
+ description =
+ ''
+ This option determines which Docker storage driver to use.
+ It is required but lacks a default value as its most
+ suitable value will depend the filesystems available on the
+ host.
+ '';
+ };
extraOptions =
mkOption {
type = types.separatedString " ";
@@ -85,7 +96,7 @@ in
after = [ "network.target" "docker.socket" ];
requires = [ "docker.socket" ];
serviceConfig = {
- ExecStart = "${pkgs.docker}/bin/docker --daemon=true --host=fd:// --group=docker ${cfg.extraOptions}";
+ ExecStart = "${pkgs.docker}/bin/docker daemon --host=fd:// --group=docker --storage-driver=${cfg.storageDriver} ${cfg.extraOptions}";
# I'm not sure if that limits aren't too high, but it's what
# goes in config bundled with docker itself
LimitNOFILE = 1048576;
@@ -111,7 +122,7 @@ in
wantedBy = [ "multi-user.target" ];
after = [ "network.target" ];
serviceConfig = {
- ExecStart = "${pkgs.docker}/bin/docker --daemon=true --group=docker ${cfg.extraOptions}";
+ ExecStart = "${pkgs.docker}/bin/docker daemon --group=docker --storage-driver=${cfg.storageDriver} ${cfg.extraOptions}";
# I'm not sure if that limits aren't too high, but it's what
# goes in config bundled with docker itself
LimitNOFILE = 1048576;