From 17aea8e06b58b9d9dfa97e9f630ace6e7d7e8a06 Mon Sep 17 00:00:00 2001 From: jaredmontoya <49511278+jaredmontoya@users.noreply.github.com> Date: Fri, 21 Mar 2025 20:16:01 +0100 Subject: [PATCH] atuin: build-time nushell config generation --- modules/programs/atuin.nix | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/modules/programs/atuin.nix b/modules/programs/atuin.nix index ccb4347fa..19f469fe2 100644 --- a/modules/programs/atuin.nix +++ b/modules/programs/atuin.nix @@ -125,17 +125,12 @@ in { ''; programs.nushell = mkIf cfg.enableNushellIntegration { - extraEnv = '' - let atuin_cache = "${config.xdg.cacheHome}/atuin" - if not ($atuin_cache | path exists) { - mkdir $atuin_cache - } - ${ - lib.getExe cfg.package - } init nu ${flagsStr} | save --force ${config.xdg.cacheHome}/atuin/init.nu - ''; extraConfig = '' - source ${config.xdg.cacheHome}/atuin/init.nu + source ${ + pkgs.runCommand "atuin-nushell-config" { } '' + ${lib.getExe cfg.package} init nu ${flagsStr} >> "$out" + '' + } ''; }; }