mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-02-07 06:19:00 +00:00
wrapper-manager-fds/modules: update module descriptions and remove inherit-arg0 as part of default argument
The makeWrapper seems to handle most of the cases fine anyways.
This commit is contained in:
parent
f4f0fe0fe0
commit
9b2b69483b
@ -8,7 +8,9 @@
|
|||||||
let
|
let
|
||||||
envConfig = config;
|
envConfig = config;
|
||||||
|
|
||||||
toStringType = with lib.types; coercedTo (oneOf [str path int float bool]) (x: "${x}") str;
|
toStringType = (with lib.types; coercedTo (oneOf [str path int float bool]) (x: "${x}") str) // {
|
||||||
|
description = "string and select types (numbers, boolean, and path) convertible to it";
|
||||||
|
};
|
||||||
envSubmodule =
|
envSubmodule =
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
@ -30,9 +32,16 @@ let
|
|||||||
Sets the appropriate action for the environment variable.
|
Sets the appropriate action for the environment variable.
|
||||||
|
|
||||||
* `unset`... unsets the given variable.
|
* `unset`... unsets the given variable.
|
||||||
|
|
||||||
* `set-default` only sets the variable with the given value if
|
* `set-default` only sets the variable with the given value if
|
||||||
not already set.
|
not already set.
|
||||||
|
|
||||||
* `set` forcibly sets the variable with given value.
|
* `set` forcibly sets the variable with given value.
|
||||||
|
|
||||||
|
* `prefix` and `suffix` prepends and appends the environment
|
||||||
|
variable containing a given separator-delimited list of values
|
||||||
|
respectively. It requires the `value` to be a list of string and a
|
||||||
|
`separator` value.
|
||||||
'';
|
'';
|
||||||
default = "set";
|
default = "set";
|
||||||
example = "unset";
|
example = "unset";
|
||||||
@ -142,6 +151,9 @@ let
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# makeWrapperArgs are unescaped, a third-party module author can take
|
||||||
|
# advantage of that with runtime expansion values (if using the shell
|
||||||
|
# wrapper).
|
||||||
makeWrapperArgs = lib.mkOption {
|
makeWrapperArgs = lib.mkOption {
|
||||||
type = with lib.types; listOf str;
|
type = with lib.types; listOf str;
|
||||||
description = ''
|
description = ''
|
||||||
@ -179,8 +191,7 @@ let
|
|||||||
"--run"
|
"--run"
|
||||||
preScript
|
preScript
|
||||||
]
|
]
|
||||||
))
|
));
|
||||||
++ [ "--inherit-argv0" ];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
(lib.mkIf (config.pathAdd != [ ]) {
|
(lib.mkIf (config.pathAdd != [ ]) {
|
||||||
@ -220,7 +231,8 @@ in
|
|||||||
* When the value is a bare package, the build process will use
|
* When the value is a bare package, the build process will use
|
||||||
`$PACKAGE.overrideAttrs` to create the package. This makes it suitable
|
`$PACKAGE.overrideAttrs` to create the package. This makes it suitable
|
||||||
to be used as part of `programs.<name>.package` typically found on
|
to be used as part of `programs.<name>.package` typically found on
|
||||||
other environments (e.g., NixOS).
|
other environments (e.g., NixOS). Take note this means a rebuild of the
|
||||||
|
package.
|
||||||
|
|
||||||
* When the value is a list of packages, the build process will use
|
* When the value is a list of packages, the build process will use
|
||||||
`symlinkJoin` as the builder to create the derivation.
|
`symlinkJoin` as the builder to create the derivation.
|
||||||
@ -240,14 +252,16 @@ in
|
|||||||
per-wrapper.
|
per-wrapper.
|
||||||
'';
|
'';
|
||||||
default = { };
|
default = { };
|
||||||
example = {
|
example = lib.literalExpression ''
|
||||||
"FOO_TYPE".value = "custom";
|
{
|
||||||
"FOO_LOG_STYLE" = {
|
"FOO_TYPE".value = "custom";
|
||||||
action = "set-default";
|
"FOO_LOG_STYLE" = {
|
||||||
value = "systemd";
|
action = "set-default";
|
||||||
};
|
value = "systemd";
|
||||||
"USELESS_VAR".action = "unset";
|
};
|
||||||
};
|
"USELESS_VAR".action = "unset";
|
||||||
|
}
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.pathAdd = lib.mkOption {
|
environment.pathAdd = lib.mkOption {
|
||||||
|
Loading…
Reference in New Issue
Block a user