From f80df90c105d081a49d123c34a57ead9dac615b9 Mon Sep 17 00:00:00 2001 From: Ujp8LfXBJ6wCPR Date: Sun, 4 Feb 2024 23:36:41 +0100 Subject: [PATCH] fish: implement shellInitLast (after others) Since the module system doesn't allow specifying order on types.lines users can't specify anything to run after what modules have put into shellInitInteractive since it runs last. This implements a fourth field that runs after all others, not to be used by HM modules, but regular users. Co-authored-by: Carl Hjerpe --- modules/programs/fish.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/modules/programs/fish.nix b/modules/programs/fish.nix index 7df9704d..473d8160 100644 --- a/modules/programs/fish.nix +++ b/modules/programs/fish.nix @@ -314,6 +314,15 @@ in { initialisation. ''; }; + + shellInitLast = mkOption { + type = types.lines; + default = ""; + description = '' + Shell script code called during interactive fish shell + initialisation, this will be the last thing executed in fish startup. + ''; + }; }; programs.fish.plugins = mkOption { @@ -469,6 +478,8 @@ in { ${cfg.interactiveShellInit} end + + ${cfg.shellInitLast} ''; } {