From c56aa0f51d058f41a7ba0c45bd3b6d9d244c0396 Mon Sep 17 00:00:00 2001 From: Varun Narravula Date: Sat, 19 Oct 2024 16:59:15 -0700 Subject: [PATCH] atuin: assert version >= 18.2.0 when daemon is enabled --- modules/programs/atuin.nix | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/modules/programs/atuin.nix b/modules/programs/atuin.nix index b7e7f8808..073994316 100644 --- a/modules/programs/atuin.nix +++ b/modules/programs/atuin.nix @@ -145,11 +145,19 @@ in { (mkIf cfg.daemon.enable (mkMerge [ { - assertions = [{ - assertion = isLinux || isDarwin; - message = - "The atuin daemon can only be configured on either Linux or macOS."; - }]; + assertions = [ + { + assertion = versionAtLeast cfg.package.version "18.2.0"; + message = '' + The atuin daemon requires at least version 18.2.0 or later. + ''; + } + { + assertion = isLinux || isDarwin; + message = + "The atuin daemon can only be configured on either Linux or macOS."; + } + ]; programs.atuin.settings = { daemon = { enabled = true; }; }; }