nixos/nomad: add assertion for the value of dropPrivileges and its relation to data_dir

This commit is contained in:
Phillip Cloud 2021-01-18 09:02:05 -05:00
parent 5105bf4b2e
commit 3e00482ba8

View File

@ -135,6 +135,13 @@ in
};
};
assertions = [
{
assertion = cfg.dropPrivileges -> cfg.settings.data_dir == "/var/lib/nomad";
message = "settings.data_dir must be equal to \"/var/lib/nomad\" if dropPrivileges is true";
}
];
# Docker support requires the Docker daemon to be running.
virtualisation.docker.enable = mkIf cfg.enableDocker true;
};