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; };