mirror of
https://github.com/nix-community/home-manager
synced 2024-12-27 04:09:47 +01:00
0daaded612
Changed the initialization method from `eval` to `source` as per the starship installation guide. See: https://starship.rs/guide/#%F0%9F%9A%80-installation This is in accordance with the Fish docs which recommends using `source` if the command does not need access to stdin, which in this case is what upstream has. See: https://fishshell.com/docs/current/cmds/eval.html
43 lines
751 B
Nix
43 lines
751 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
|
|
{
|
|
config = {
|
|
programs = {
|
|
fish.enable = true;
|
|
|
|
starship = {
|
|
enable = true;
|
|
enableInteractive = false;
|
|
};
|
|
};
|
|
|
|
nmt.script = ''
|
|
assertFileExists home-files/.config/fish/config.fish
|
|
|
|
export GOT="$(tail -n 5 `_abs home-files/.config/fish/config.fish`)"
|
|
export EXPECTED="
|
|
if test \"\$TERM\" != dumb
|
|
/home/hm-user/.nix-profile/bin/starship init fish | source
|
|
|
|
end"
|
|
|
|
export MESSAGE="
|
|
==========
|
|
Expected
|
|
==========
|
|
$EXPECTED
|
|
==========
|
|
Got
|
|
==========
|
|
$GOT
|
|
==========
|
|
"
|
|
|
|
if [[ "$GOT" != "$EXPECTED" ]]; then
|
|
fail "$MESSAGE"
|
|
fi
|
|
'';
|
|
};
|
|
}
|