mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-19 12:11:28 +00:00
decb4266f1
This patch does two things 1. builds nano with sysconfdir=/etc; and 2. adds an option programs.nano.nanorc
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;
|
|
};
|
|
|
|
}
|