mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-20 16:15:43 +02:00
lib/helpers: mkRaw now behaves like mkRawIfNonNull
This commit is contained in:
parent
e5cc0c093b
commit
8cf2d943d2
2 changed files with 5 additions and 4 deletions
|
@ -83,7 +83,7 @@ Because the options may not have the same case (and may require some pre-process
|
|||
```nix
|
||||
{
|
||||
some_opt = cfg.someOpt;
|
||||
some_raw_opt = helpers.ifNonNull' cfg.someRawOpt (mkRaw cfg.someRawOpt);
|
||||
some_raw_opt = helpers.mkRaw cfg.someRawOpt;
|
||||
some_meta_opt = with cfg.metaOpt; # metaOpt = { foo = ...; someOtherOpt = ...; };
|
||||
{
|
||||
inherit foo;
|
||||
|
|
|
@ -115,8 +115,6 @@ with lib; rec {
|
|||
then null
|
||||
else y;
|
||||
|
||||
mkRawIfNonNull = v: ifNonNull' v (mkRaw v);
|
||||
|
||||
mkCompositeOption = desc: options:
|
||||
mkNullOrOption (types.submodule {inherit options;}) desc;
|
||||
|
||||
|
@ -273,7 +271,10 @@ with lib; rec {
|
|||
};
|
||||
};
|
||||
|
||||
mkRaw = r: {__raw = r;};
|
||||
mkRaw = r:
|
||||
ifNonNull'
|
||||
r
|
||||
{__raw = r;};
|
||||
|
||||
wrapDo = string: ''
|
||||
do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue