From 9a2a5d41cba34847aec02c66c30955be375e544d Mon Sep 17 00:00:00 2001 From: isabel Date: Sat, 4 Jul 2026 18:55:44 +0100 Subject: [PATCH] isabel/fish: fix load order --- home/isabel/fish.nix | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/home/isabel/fish.nix b/home/isabel/fish.nix index 7c5ec33f..f0e3118a 100644 --- a/home/isabel/fish.nix +++ b/home/isabel/fish.nix @@ -11,20 +11,16 @@ in sops = { secrets.env = { }; - templates.fish-env = { - content = '' - function setup_secrets_vars; - if [ -n "$__SECRETS_SOURCED" ] - return - end - set -gx __SECRETS_SOURCED '1' - ${config.sops.placeholder.env} + templates.fish-env.content = '' + function setup_secrets_vars; + if [ -n "$__SECRETS_SOURCED" ] + return end - setup_secrets_vars - ''; - - path = "${config.home.homeDirectory}/.config/fish/conf.d/sops-env.fish"; - }; + set -gx __SECRETS_SOURCED '1' + ${config.sops.placeholder.env} + end + setup_secrets_vars + ''; }; programs.fish = { @@ -54,7 +50,7 @@ in }; loginShellInit = optionalString pkgs.stdenv.hostPlatform.isDarwin '' - fish_add_path --move --prepend --path $HOME/.nix-profile/bin /run/wrappers/bin /etc/profiles/per-user/$USER/bin /run/current-system/sw/bin /nix/var/nix/profiles/default/bin + fish_add_path --move --prepend --path $HOME/.nix-profile/bin /run/wrappers/bin /etc/profiles/per-user/$USER/bin /run/current-system/sw/bin /nix/var/nix/profiles/default/bin ''; shellInit = '' @@ -63,6 +59,8 @@ in set -g theme_display_date no set -g theme_nerd_fonts yes set -g theme_newline_cursor yes + + source ${config.sops.templates.fish-env.path} ''; }; } -- 2.51.2