1{ config, lib, ... }: 2 3let 4 cfg = config.programs.nano; 5in 6 7{ 8 ###### interface 9 10 options = { 11 programs.nano = { 12 13 nanorc = lib.mkOption { 14 type = lib.types.lines; 15 default = ""; 16 description = '' 17 The system-wide nano configuration. 18 See <citerefentry><refentrytitle>nanorc</refentrytitle><manvolnum>5</manvolnum></citerefentry>. 19 ''; 20 example = '' 21 set nowrap 22 set tabstospaces 23 set tabsize 4 24 ''; 25 }; 26 }; 27 }; 28 29 ###### implementation 30 31 config = lib.mkIf (cfg.nanorc != "") { 32 environment.etc."nanorc".text = cfg.nanorc; 33 }; 34 35}