Merge pull request #220481 from uoleg/master
nixos/nano: refactor nanorc creation
This commit is contained in:
commit
43b346ea1e
|
@ -35,8 +35,17 @@ in
|
|||
###### implementation
|
||||
|
||||
config = lib.mkIf (cfg.nanorc != "" || cfg.syntaxHighlight) {
|
||||
environment.etc.nanorc.text = lib.concatStrings [ cfg.nanorc
|
||||
(lib.optionalString cfg.syntaxHighlight ''${LF}include "${pkgs.nano}/share/nano/*.nanorc"'') ];
|
||||
environment.etc.nanorc.text = lib.concatStringsSep LF (
|
||||
( lib.optionals cfg.syntaxHighlight [
|
||||
"# The line below is added because value of programs.nano.syntaxHighlight is set to true"
|
||||
''include "${pkgs.nano}/share/nano/*.nanorc"''
|
||||
""
|
||||
])
|
||||
++ ( lib.optionals (cfg.nanorc != "") [
|
||||
"# The lines below have been set from value of programs.nano.nanorc"
|
||||
cfg.nanorc
|
||||
])
|
||||
);
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue