From 624c97de9cae5ba1432557df579b64a79d90fadc Mon Sep 17 00:00:00 2001 From: Yechiel Worenklein <41305372+yechielw@users.noreply.github.com> Date: Tue, 19 Nov 2024 23:57:57 +0200 Subject: [PATCH] oh-my-posh: added option to supply config path --- modules/programs/oh-my-posh.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/modules/programs/oh-my-posh.nix b/modules/programs/oh-my-posh.nix index 087696dfb..53a94675b 100644 --- a/modules/programs/oh-my-posh.nix +++ b/modules/programs/oh-my-posh.nix @@ -16,6 +16,8 @@ let "--config ${config.xdg.configHome}/oh-my-posh/config.json" else if cfg.useTheme != null then "--config ${cfg.package}/share/oh-my-posh/themes/${cfg.useTheme}.omp.json" + else if cfg.configFile != null then + "--config ${cfg.configFile}" else ""; @@ -52,6 +54,14 @@ in ''; }; + configFile = lib.mkOption { + type = with lib.types; nullOr (either str path); + default = null; + description = '' + Path to a custom configuration path, can be json, yaml or toml. + ''; + }; + enableBashIntegration = lib.hm.shell.mkBashIntegrationOption { inherit config; }; enableFishIntegration = lib.hm.shell.mkFishIntegrationOption { inherit config; };