diff options
author | Tim Steinbach <NeQuissimus@users.noreply.github.com> | 2017-09-06 15:03:56 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-06 15:03:56 -0400 |
commit | a54b2e3ba226c9fa3e7f4ec72fbada8e0859a300 (patch) | |
tree | 53674fa574ad4844534a85b7da4d0a20d155a0a9 /nixos/modules/virtualisation | |
parent | 0857e4c84d3ba9e4faa52aa033bbde3607652e86 (diff) | |
parent | 380ed98bd793b2f3cbf257b7ef9601770c4f8d48 (diff) | |
download | nixlib-a54b2e3ba226c9fa3e7f4ec72fbada8e0859a300.tar nixlib-a54b2e3ba226c9fa3e7f4ec72fbada8e0859a300.tar.gz nixlib-a54b2e3ba226c9fa3e7f4ec72fbada8e0859a300.tar.bz2 nixlib-a54b2e3ba226c9fa3e7f4ec72fbada8e0859a300.tar.lz nixlib-a54b2e3ba226c9fa3e7f4ec72fbada8e0859a300.tar.xz nixlib-a54b2e3ba226c9fa3e7f4ec72fbada8e0859a300.tar.zst nixlib-a54b2e3ba226c9fa3e7f4ec72fbada8e0859a300.zip |
Merge pull request #29002 from NeQuissimus/docker_edge_module_test
docker: Package in module, tests
Diffstat (limited to 'nixos/modules/virtualisation')
-rw-r--r-- | nixos/modules/virtualisation/docker.nix | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/nixos/modules/virtualisation/docker.nix b/nixos/modules/virtualisation/docker.nix index 5a8a0e27436f..a9a2095499a7 100644 --- a/nixos/modules/virtualisation/docker.nix +++ b/nixos/modules/virtualisation/docker.nix @@ -126,14 +126,23 @@ in ''; }; }; + + package = mkOption { + default = pkgs.docker; + type = types.package; + example = pkgs.docker-edge; + description = '' + Docker package to be used in the module. + ''; + }; }; ###### implementation config = mkIf cfg.enable (mkMerge [{ - environment.systemPackages = [ pkgs.docker ]; + environment.systemPackages = [ cfg.package ]; users.extraGroups.docker.gid = config.ids.gids.docker; - systemd.packages = [ pkgs.docker ]; + systemd.packages = [ cfg.package ]; systemd.services.docker = { wantedBy = optional cfg.enableOnBoot "multi-user.target"; @@ -142,7 +151,7 @@ in ExecStart = [ "" '' - ${pkgs.docker}/bin/dockerd \ + ${cfg.package}/bin/dockerd \ --group=docker \ --host=fd:// \ --log-driver=${cfg.logDriver} \ @@ -180,7 +189,7 @@ in serviceConfig.Type = "oneshot"; script = '' - ${pkgs.docker}/bin/docker system prune -f ${toString cfg.autoPrune.flags} + ${cfg.package}/bin/docker system prune -f ${toString cfg.autoPrune.flags} ''; startAt = optional cfg.autoPrune.enable cfg.autoPrune.dates; |