3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #53968 from avdv/nano-syntax-enabled

programs/nano: Generate nanorc if `syntaxHighlight` enabled
This commit is contained in:
Maximilian Bosch 2019-01-14 23:41:48 +01:00 committed by GitHub
commit 95ba4fbe4d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2,6 +2,7 @@
let
cfg = config.programs.nano;
LF = "\n";
in
{
@ -33,9 +34,9 @@ in
###### implementation
config = lib.mkIf (cfg.nanorc != "") {
config = lib.mkIf (cfg.nanorc != "" || cfg.syntaxHighlight) {
environment.etc."nanorc".text = lib.concatStrings [ cfg.nanorc
(lib.optionalString cfg.syntaxHighlight ''include "${pkgs.nano}/share/nano/*.nanorc"'') ];
(lib.optionalString cfg.syntaxHighlight ''${LF}include "${pkgs.nano}/share/nano/*.nanorc"'') ];
};
}