mirror of
https://github.com/nix-community/home-manager
synced 2024-11-11 05:39:44 +01:00
oh-my-posh: fix test under Darwin
This commit is contained in:
parent
0402cca9d8
commit
a7c92eece7
1 changed files with 16 additions and 6 deletions
|
@ -1,4 +1,4 @@
|
||||||
{ ... }:
|
{ pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
programs = {
|
programs = {
|
||||||
|
@ -15,15 +15,25 @@
|
||||||
nushell = { };
|
nushell = { };
|
||||||
};
|
};
|
||||||
|
|
||||||
nmt.script = ''
|
nmt.script = let
|
||||||
assertFileExists home-files/.config/nushell/env.nu
|
configFile = if pkgs.stdenv.isDarwin then
|
||||||
|
"home-files/Library/Application Support/nushell/config.nu"
|
||||||
|
else
|
||||||
|
"home-files/.config/nushell/config.nu";
|
||||||
|
|
||||||
|
envFile = if pkgs.stdenv.isDarwin then
|
||||||
|
"home-files/Library/Application Support/nushell/env.nu"
|
||||||
|
else
|
||||||
|
"home-files/.config/nushell/env.nu";
|
||||||
|
in ''
|
||||||
|
assertFileExists "${envFile}"
|
||||||
assertFileRegex \
|
assertFileRegex \
|
||||||
home-files/.config/nushell/env.nu \
|
"${envFile}" \
|
||||||
'/bin/oh-my-posh init nu --config .*--print \| save --force /.*/home-files/\.cache/oh-my-posh/init\.nu'
|
'/bin/oh-my-posh init nu --config .*--print \| save --force /.*/home-files/\.cache/oh-my-posh/init\.nu'
|
||||||
|
|
||||||
assertFileExists home-files/.config/nushell/config.nu
|
assertFileExists "${configFile}"
|
||||||
assertFileRegex \
|
assertFileRegex \
|
||||||
home-files/.config/nushell/config.nu \
|
"${configFile}" \
|
||||||
'source /.*/\.cache/oh-my-posh/init\.nu'
|
'source /.*/\.cache/oh-my-posh/init\.nu'
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue