diff options
author | Mateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk> | 2015-07-21 19:13:54 +0100 |
---|---|---|
committer | Mateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk> | 2015-07-21 19:13:54 +0100 |
commit | 8d70b5cd91aebedd451cf1a80e66155ba85ad3d5 (patch) | |
tree | bc19b13ee7d976d7bca7fc6588213d9152520d8b /nixos/modules | |
parent | ecb38b5fb6f12b19862fedbb6774fb886dbd84c2 (diff) | |
parent | 23187c343109f5420f56f52107dce29b65bcf48f (diff) | |
download | nixlib-8d70b5cd91aebedd451cf1a80e66155ba85ad3d5.tar nixlib-8d70b5cd91aebedd451cf1a80e66155ba85ad3d5.tar.gz nixlib-8d70b5cd91aebedd451cf1a80e66155ba85ad3d5.tar.bz2 nixlib-8d70b5cd91aebedd451cf1a80e66155ba85ad3d5.tar.lz nixlib-8d70b5cd91aebedd451cf1a80e66155ba85ad3d5.tar.xz nixlib-8d70b5cd91aebedd451cf1a80e66155ba85ad3d5.tar.zst nixlib-8d70b5cd91aebedd451cf1a80e66155ba85ad3d5.zip |
Merge pull request #8904 from Fuuzetsu/docker-custom-postStart
docker: allow the user to override postStart
Diffstat (limited to 'nixos/modules')
-rw-r--r-- | nixos/modules/virtualisation/docker.nix | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/nixos/modules/virtualisation/docker.nix b/nixos/modules/virtualisation/docker.nix index ef9cc2280db7..2339cf7c6490 100644 --- a/nixos/modules/virtualisation/docker.nix +++ b/nixos/modules/virtualisation/docker.nix @@ -54,6 +54,21 @@ in ''; }; + postStart = + mkOption { + type = types.string; + default = '' + while ! [ -e /var/run/docker.sock ]; do + sleep 0.1 + done + ''; + description = '' + The postStart phase of the systemd service. You may need to + override this if you are passing in flags to docker which + don't cause the socket file to be created. + ''; + }; + }; @@ -106,11 +121,7 @@ in path = [ pkgs.kmod ]; environment.MODULE_DIR = "/run/current-system/kernel-modules/lib/modules"; - postStart = '' - while ! [ -e /var/run/docker.sock ]; do - sleep 0.1 - done - ''; + postStart = cfg.postStart; # Presumably some containers are running we don't want to interrupt restartIfChanged = false; |