nixpkgs/nixos/tests/hocker-fetchdocker/machine.nix
Florian Klink f74735c9d7 nixos: remove dependencies on local-fs.target
Since https://github.com/NixOS/nixpkgs/pull/61321, local-fs.target is
part of sysinit.target again, meaning units without
DefaultDependencies=no will automatically depend on it, and the manual
set dependencies can be dropped.
2019-09-01 19:06:38 +02:00

27 lines
631 B
Nix

{ pkgs, ... }:
{ 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" ];
wants = [ "docker.service" ];
after = [ "docker.service" ];
script = ''
${pkgs.hello-world-container}/compositeImage.sh | ${pkgs.docker}/bin/docker load
'';
serviceConfig = {
Type = "oneshot";
};
};
}