File tree Expand file tree Collapse file tree 1 file changed +17
-23
lines changed
Expand file tree Collapse file tree 1 file changed +17
-23
lines changed Original file line number Diff line number Diff line change 11{
22 lib ,
33 config ,
4- options ,
54 modulesPath ,
65 pkgs ,
7- utils ,
86 ...
97} :
108let
11- inherit ( lib ) mkOption types ;
9+ inherit ( lib )
10+ mkOption
11+ types
12+ ;
1213in
1314{
1415 options =
1516 let
16- nix-module = import ( modulesPath + "/config/nix.nix" ) {
17- inherit config lib pkgs ;
18- } ;
17+ nix-module = import ( modulesPath + "/config/nix.nix" ) { inherit config lib pkgs ; } ;
18+ nixOpts = nix-module . options . nix . settings . type . getSubOptions { } ;
1919 in
2020 {
21- inherit ( nix-module . options ) nix ;
22-
21+ settings = mkOption {
22+ type = types . submodule {
23+ options = {
24+ inherit ( nixOpts )
25+ substituters
26+ trusted-public-keys
27+ ;
28+ } ;
29+ } ;
30+ } ;
2331 __toString = mkOption {
2432 type = with types ; functionTo str ;
2533 readOnly = true ;
4856 else if strings . isConvertibleWithToString v then
4957 toString v
5058 else
51- abort "The nix conf value: ${ toPretty { } v } can not be encoded" ;
59+ abort "The nix conf value: ${ generators . toPretty { } v } can not be encoded" ;
5260
5361 mkKeyValue = k : v : "${ escape [ "=" ] k } = ${ mkValueString v } " ;
5462
6169 ${ mkKeyValuePairs ( filterAttrs ( key : value : isExtra key ) self . settings ) }
6270 '' ;
6371 } ;
64- settings = mkOption {
65- type = types . submodule {
66- options =
67- let
68- nixOpts = options . nix . settings . type . getSubOptions { } ;
69- in
70- {
71- inherit ( nixOpts )
72- substituters
73- trusted-public-keys
74- ;
75- } ;
76- } ;
77- } ;
7872 } ;
7973}
You can’t perform that action at this time.
0 commit comments