From 7cadb898184517e2ce2e99e5a12d77d9a1b66cfd Mon Sep 17 00:00:00 2001 From: Florian Sesser <florian@private.storage> Date: Thu, 25 Jan 2024 13:55:07 +0000 Subject: [PATCH] Add fallback to 29d if 'monitoring' attribute is unavailable --- nixos/modules/private-storage.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nixos/modules/private-storage.nix b/nixos/modules/private-storage.nix index 58d14217..913cceba 100644 --- a/nixos/modules/private-storage.nix +++ b/nixos/modules/private-storage.nix @@ -17,7 +17,10 @@ let # # NOTE: This is promised by the service privacy policy. It *may not* be # raised without following the process for updating the privacy policy. - max-incident-age = toString(cfg.monitoring.policy.logRetentionSeconds) + "s"; + # Fallback to 29d if "monitoring" attribute is not available (currently + # in the system tests) + max-incident-age = toString(cfg.monitoring.policy.logRetentionSeconds or + (29 * (24 * 60 * 60))) + "s"; fqdn = "${ assert config.networking.hostName != null; config.networking.hostName -- GitLab