virtualisation.docker: require docker.service for docker-prune.service

else docker-prune fails when docker is not launched. Adjusted the test as well
This commit is contained in:
Matthieu Coudron 2022-09-23 11:42:00 +02:00 committed by Bjørn Forsman
parent d77812e649
commit fd62fdca5b
2 changed files with 3 additions and 0 deletions

View File

@ -221,6 +221,8 @@ in
'';
startAt = optional cfg.autoPrune.enable cfg.autoPrune.dates;
after = [ "docker.service" ];
requires = [ "docker.service" ];
};
assertions = [

View File

@ -11,6 +11,7 @@ import ./make-test-python.nix ({ pkgs, ...} : {
{ pkgs, ... }:
{
virtualisation.docker.enable = true;
virtualisation.docker.autoPrune.enable = true;
virtualisation.docker.package = pkgs.docker;
users.users = {