From 414b7c5a0131bf075bc81a4103035d057e2070c0 Mon Sep 17 00:00:00 2001 From: Edward Hesketh Date: Wed, 30 Apr 2025 16:08:54 +0100 Subject: [PATCH] nixos/ncps: wait for network-online, remove failing assertion - Start after network-online as ncps requires all upstreams to be online and reachable when starting - Remove a bad assertion causing failures at eval time when using secrets management systems --- nixos/modules/services/networking/ncps.nix | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/nixos/modules/services/networking/ncps.nix b/nixos/modules/services/networking/ncps.nix index 12b51bf05217..d29a24445ae7 100644 --- a/nixos/modules/services/networking/ncps.nix +++ b/nixos/modules/services/networking/ncps.nix @@ -206,11 +206,6 @@ in assertion = cfg.cache.lru.schedule == null || cfg.cache.maxSize != null; message = "You must specify config.ncps.cache.lru.schedule when config.ncps.cache.maxSize is set"; } - - { - assertion = cfg.cache.secretKeyPath == null || (builtins.pathExists cfg.cache.secretKeyPath); - message = "config.ncps.cache.secresecretKeyPath=${cfg.cache.secretKeyPath} must exist but does not"; - } ]; users.users.ncps = { @@ -245,7 +240,8 @@ in systemd.services.ncps = { description = "ncps binary cache proxy service"; - after = [ "network.target" ]; + after = [ "network-online.target" ]; + wants = [ "network-online.target" ]; wantedBy = [ "multi-user.target" ]; preStart = ''