mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 14:11:36 +00:00
36 lines
642 B
Nix
36 lines
642 B
Nix
|
{ config, lib, ... }:
|
||
|
|
||
|
let
|
||
|
cfg = config.programs.nano;
|
||
|
in
|
||
|
|
||
|
{
|
||
|
###### interface
|
||
|
|
||
|
options = {
|
||
|
programs.nano = {
|
||
|
|
||
|
nanorc = lib.mkOption {
|
||
|
type = lib.types.lines;
|
||
|
default = "";
|
||
|
description = ''
|
||
|
The system-wide nano configuration.
|
||
|
See <citerefentry><refentrytitle>nanorc</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
|
||
|
'';
|
||
|
example = ''
|
||
|
set nowrap
|
||
|
set tabstospaces
|
||
|
set tabsize 4
|
||
|
'';
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
|
||
|
###### implementation
|
||
|
|
||
|
config = lib.mkIf (cfg.nanorc != "") {
|
||
|
environment.etc."nanorc".text = cfg.nanorc;
|
||
|
};
|
||
|
|
||
|
}
|