diff options
author | Phillip Cloud <cloud@standard.ai> | 2021-01-18 09:02:05 -0500 |
---|---|---|
committer | Phillip Cloud <cloud@standard.ai> | 2021-01-23 19:44:37 -0500 |
commit | 3e00482ba879e3b061d0dcf3f37d3263c48bfa34 (patch) | |
tree | 1a5cb806847af059408a8d4e1bb2f444a049c1e6 /nixos | |
parent | 5105bf4b2eb842a07856a5230f21fb635cf7bc00 (diff) |
nixos/nomad: add assertion for the value of dropPrivileges and its relation to data_dir
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/services/networking/nomad.nix | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/nixos/modules/services/networking/nomad.nix b/nixos/modules/services/networking/nomad.nix index dafdae0c327b9..04f15fe136648 100644 --- a/nixos/modules/services/networking/nomad.nix +++ b/nixos/modules/services/networking/nomad.nix @@ -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; }; |