2018-07-20 22:56:59 +02:00
|
|
|
{ pkgs, ... }:
|
2017-12-02 04:06:16 +01:00
|
|
|
{ nixpkgs.config.packageOverrides = pkgs': {
|
|
|
|
hello-world-container = pkgs'.callPackage ./hello-world-container.nix { };
|
|
|
|
};
|
|
|
|
|
|
|
|
virtualisation.docker = {
|
|
|
|
enable = true;
|
|
|
|
package = pkgs.docker;
|
|
|
|
};
|
|
|
|
|
|
|
|
systemd.services.docker-load-fetchdocker-image = {
|
|
|
|
description = "Docker load hello-world-container";
|
|
|
|
wantedBy = [ "multi-user.target" ];
|
2019-09-01 03:07:23 +02:00
|
|
|
wants = [ "docker.service" ];
|
|
|
|
after = [ "docker.service" ];
|
2017-12-02 04:06:16 +01:00
|
|
|
|
|
|
|
script = ''
|
|
|
|
${pkgs.hello-world-container}/compositeImage.sh | ${pkgs.docker}/bin/docker load
|
|
|
|
'';
|
|
|
|
|
|
|
|
serviceConfig = {
|
|
|
|
Type = "oneshot";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|