2.home-manager/tests/modules/programs/oh-my-posh/nushell.nix
Austin Horstman 53cacafd9b treewide: nushell build time configs suffixed
Add filetype suffix for LSP/tree-sitter support.
2025-04-02 10:26:07 -05:00

26 lines
584 B
Nix

{ lib, pkgs, realPkgs, config, ... }:
{
programs = {
nushell.enable = true;
oh-my-posh = {
enable = true;
useTheme = "jandedobbeleer";
};
};
_module.args.pkgs = lib.mkForce realPkgs;
nmt.script = let
configFile = if pkgs.stdenv.isDarwin && !config.xdg.enable then
"home-files/Library/Application Support/nushell/config.nu"
else
"home-files/.config/nushell/config.nu";
in ''
assertFileExists "${configFile}"
assertFileRegex \
"${configFile}" \
'source /nix/store/[^/]*-oh-my-posh-nushell-config.nu'
'';
}