Age | Commit message (Collapse) | Author |
|
isNull "is deprecated; just write e == null instead" says the Nix manual
|
|
|
|
b4b67177b53c23c6fb77aea7f0bc5c559f8bebe5 introduced a regression of
its own: the prompt would end with $ for all users, not with # for
root as it should.
|
|
|
|
|
|
`XDG_DATA_DIRS` already includes what is typically the `share` directory.
Adding an extra `share` breaks it.
|
|
|
|
|
|
This patch uses the library function `lib.escapeShellArg` to improve
the handling of shell aliases in the NixOS module `bash`, copying the
corresponding change made to the `zsh` module in commit
1e211a70cbdaf230a18ea4cb67a959039d5c2ddb (for which GitHub pull
request #47471 was filed).
This patch resolves GitHub issue #16973.
This change presumably also should be copied to the `fish` module, but
I don't know `fish` syntax so that won't be done by me.
GitHub: Close NixOS/nixpkgs#16973.
|
|
to comply with `doc/coding-conventions.xml`
|
|
A shared exported guard `__NIXOS_SET_ENVIRONMENT_DONE` is introduced that can
be used to prevent child shells from sourcing `system.build.setEnvironment`
the second time.
This fixes e.g. `nix run derivation` when run from e.g. ZSH through the console or
ssh. Before this Bash would resource the common environment resetting the `PATH`
environment variable.
We also export `system.build.setEnvironment` to `/etc/set-environment` making it
easy to reset the common environment with `. /etc/set-environment` when
needed and to grep for environment variables in `/etc` (which was the
motivation of #30418).
This reverts changes made in b00a3fc6fd82834114771f2115a2b032f0ebfe29
(the original #30418).
|
|
Because it improves out-of-the-box user experience a lot (IMHO).
(zsh completion is already on by default.)
Remove "programs.bash.enableCompletion = true" from
nixos-generate-config.pl, which feels superflous now.
|
|
nixos: inline set-environment for bash and zsh
|
|
|
|
https://github.com/scop/bash-completion/blob/fbd52a5e31747beb4974da97b9d3ed4f6ceb7a61/bash_completion#L2070-L2078
|
|
As described in detail here: https://github.com/NixOS/nixpkgs/issues/32533
bash will load completion scripts in $p/share/bash-completion/completions/ on
startup instead of letting bash-completion do it's lazy loading. Bash startup
will then slow down (very noticeable when bash-completion is installed in a
profile).
This commit leaves loading of scripts in the hands of bash-completion,
improving startup time for everyone using `enableCompletion`.
fixes #32533
|
|
The bash module currently sets the `/etc/inputrc` unconditionally,
which prevents easy user override. This commit lowers the priority of
the setting to "option default" level, which allows a user to override
the value using either
environment.etc."inputrc".text = …
or
environment.etc."inputrc".source = …
|
|
|
|
This changes the attribute name of bash-completion from `bashCompletion`
to `bash-completion`. Keeps `bashCompletion` as an alias for the new
name.
|
|
|
|
The string type is still available for backward-compatiblity.
|
|
This reverts commit ddd480ac30579d780c8ffa9c590a8c86bb36d8d2. Gave it
some more thought.
|
|
This reverts commit e8e8164f348a0e8655e1d50a7a404bdc62055f4e. I
misread the original commit as adding the "which" package, but it only
adds it to base.nix. So then the original motivation (making it work
in subshells) doesn't hold. Note that we already have some convenience
aliases that don't work in subshells either (such as "ll").
|
|
Aliases are not the same as programs. They won't work in subshells.
It's better to just use which as it's only 88K.
|
|
833a5971568f8b5ea189126d61d8461d039bb93c
|
|
The idea that the interactive bash prompt isn't set in case of TERM=dumb
is intended to fix problems when other machines log remotely into a
NixOS installation via Tramp. A side-effect that change was, however,
that Emacs' shell-mode no longer had a correct prompt. I suppose the
presence of
INSIDE_EMACS=24.5.2,comint
is a sufficiently unique indication that the current interactive shell
is running inside of an Emacs and that the prompt can thus be configured
safely.
|
|
|
|
|
|
This reverts commit ee8e15fe76a235ae3583d4e8cb4bb370f28c5eae. See
discussion at https://github.com/NixOS/nixpkgs/commit/ee8e15fe76a235ae3583d4e8cb4bb370f28c5eae.
|
|
|
|
NixOS has a pervasive dependency on bash. For instance, the X11
session script sources /etc/profile to get a reasonable
environment. Thus we should not provide an option to disable bash.
Also, enabling zsh no longer sets ‘users.defaultUserShell’ to zsh, to
prevent a collision with bash's definition of the same
option. (Changing the default shell is also something that should be
left to the user.)
|
|
Using pkgs.lib on the spine of module evaluation is problematic
because the pkgs argument depends on the result of module
evaluation. To prevent an infinite recursion, pkgs and some of the
modules are evaluated twice, which is inefficient. Using ‘with lib’
prevents this problem.
|
|
settings
|
|
|