mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-09 17:46:29 +09:00
starship: add xonsh shell configuration (#359614)
This commit is contained in:
commit
8819179206
2 changed files with 14 additions and 0 deletions
|
@ -515,6 +515,8 @@ Alongside many enhancements to NixOS modules and general system improvements, th
|
|||
|
||||
- `bind.cacheNetworks` now only controls access for recursive queries, where it previously controlled access for all queries.
|
||||
|
||||
- The [Starship](https://starship.rs) module now automatically loads the starship prompt when using [`xonsh`](https://xon.sh).
|
||||
|
||||
- [`services.mongodb.enableAuth`](#opt-services.mongodb.enableAuth) now uses the newer [mongosh](https://github.com/mongodb-js/mongosh) shell instead of the legacy shell to configure the initial superuser. You can configure the mongosh package to use through the [`services.mongodb.mongoshPackage`](#opt-services.mongodb.mongoshPackage) option.
|
||||
|
||||
- There is a new set of NixOS test tools for testing virtual Wi-Fi networks in many different topologies. See the {option}`services.vwifi` module, {option}`services.kismet` NixOS test, and [manual](https://nixos.org/manual/nixpkgs/unstable/#sec-nixos-test-wifi) for documentation and examples.
|
||||
|
|
|
@ -158,6 +158,18 @@ in
|
|||
eval "$(${cfg.package}/bin/starship init zsh)"
|
||||
fi
|
||||
'';
|
||||
|
||||
# use `config` instead of `${initOption}` because `programs.xonsh` doesn't have `shellInit` or `promptInit`
|
||||
programs.xonsh.config = ''
|
||||
if $TERM != "dumb":
|
||||
# don't set STARSHIP_CONFIG automatically if there's a user-specified
|
||||
# config file. starship appears to use a hardcoded config location
|
||||
# rather than one inside an XDG folder:
|
||||
# https://github.com/starship/starship/blob/686bda1706e5b409129e6694639477a0f8a3f01b/src/configure.rs#L651
|
||||
if not `$HOME/.config/starship.toml`:
|
||||
$STARSHIP_CONFIG = ('${settingsFile}')
|
||||
execx($(${cfg.package}/bin/starship init xonsh))
|
||||
'';
|
||||
};
|
||||
|
||||
meta.maintainers = pkgs.starship.meta.maintainers;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue