| Commit message (Collapse) | Author | Age |
| |
|
| |
|
|\
| |
| | |
nixos/shells: Avoid overriding the environment for other child shells
|
| |
| |
| |
| | |
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).
|
| | |
|
|/ |
|
| |
|
| |
|
|
|
|
| |
follow up of https://github.com/NixOS/nixpkgs/pull/25550
|
| |
|
| |
|
|\ |
|
| | |
|
|/ |
|
|
|
|
| |
The string type is still available for backward-compatiblity.
|
|
|
|
|
|
|
|
| |
This reverts commit 4e9833d9e8e7bb449ca897d1f7e9db48fbf8aa53, reversing
changes made to 6194e9d801d31d6241deb5c6dc534975887f143d.
Setting TERMINFO prevents ncurses from reading TERMINFO_DIRS. See
https://github.com/NixOS/nixpkgs/pull/15384#issuecomment-221205596
|
| |
|
|
|
|
|
|
| |
- add missing types in module definitions
- add missing 'defaultText' in module definitions
- wrap example with 'literalExample' where necessary in module definitions
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Should bring most of the examples into a better consistency regarding
syntactic representation in the manual.
Thanks to @devhell for reporting.
Signed-off-by: aszlig <aszlig@redmoonstudios.org>
|
| |
|
|
|
|
| |
This reverts commit 491c088731022463978e595956427e72db6306a9.
|
|
|
|
| |
This reverts commit 18a0cdd86416a8cbc263cfa8cb96c460a53f7b5c.
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
| |
E.g.
The unique option `fileSystems./.device' is defined multiple times, in `/etc/nixos/configuration.nix' and `/etc/nixos/foo.nix'.
This requires passing file/value tuples to the merge functions.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For instance, if time.timeZone is defined multiple times, you now get
the error message:
error: user-thrown exception: The unique option `time.timeZone' is defined multiple times, in `/etc/nixos/configurations/misc/eelco/x11vnc.nix' and `/etc/nixos/configuration.nix'.
while previously you got:
error: user-thrown exception: Multiple definitions of string. Only one is allowed for this option.
and only an inspection of the stack trace gave a clue as to what
option caused the problem.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The major changes are:
* The evaluation is now driven by the declared options. In
particular, this fixes the long-standing problem with lack of
laziness of disabled option definitions. Thus, a configuration like
config = mkIf false {
environment.systemPackages = throw "bla";
};
will now evaluate without throwing an error. This also improves
performance since we're not evaluating unused option definitions.
* The implementation of properties is greatly simplified.
* There is a new type constructor "submodule" that replaces
"optionSet". Unlike "optionSet", "submodule" gets its option
declarations as an argument, making it more like "listOf" and other
type constructors. A typical use is:
foo = mkOption {
type = type.attrsOf (type.submodule (
{ config, ... }:
{ bar = mkOption { ... };
xyzzy = mkOption { ... };
}));
};
Existing uses of "optionSet" are automatically mapped to
"submodule".
* Modules are now checked for unsupported attributes: you get an error
if a module contains an attribute other than "config", "options" or
"imports".
* The new implementation is faster and uses much less memory.
|
|
|