summary refs log tree commit diff
path: root/nixos/modules/programs
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2014-08-14 23:51:29 +0200
committerVladimír Čunát <vcunat@gmail.com>2014-08-14 23:51:29 +0200
commit56d9b2cc8a50554c8f4a8ce7ac9218c42e9340c1 (patch)
tree4b468edb44e107e4a9b954d6b202e54e8c5a1541 /nixos/modules/programs
parent06a324f7dc520776309ed793cc008b5c04a32a2e (diff)
parent2fc0537018180b32071ea350cc22d86115adf9e8 (diff)
downloadnixlib-56d9b2cc8a50554c8f4a8ce7ac9218c42e9340c1.tar
nixlib-56d9b2cc8a50554c8f4a8ce7ac9218c42e9340c1.tar.gz
nixlib-56d9b2cc8a50554c8f4a8ce7ac9218c42e9340c1.tar.bz2
nixlib-56d9b2cc8a50554c8f4a8ce7ac9218c42e9340c1.tar.lz
nixlib-56d9b2cc8a50554c8f4a8ce7ac9218c42e9340c1.tar.xz
nixlib-56d9b2cc8a50554c8f4a8ce7ac9218c42e9340c1.tar.zst
nixlib-56d9b2cc8a50554c8f4a8ce7ac9218c42e9340c1.zip
merge #3428: nano: bump and add system-wide config
Diffstat (limited to 'nixos/modules/programs')
-rw-r--r--nixos/modules/programs/nano.nix35
1 files changed, 35 insertions, 0 deletions
diff --git a/nixos/modules/programs/nano.nix b/nixos/modules/programs/nano.nix
new file mode 100644
index 000000000000..b8803eec7be1
--- /dev/null
+++ b/nixos/modules/programs/nano.nix
@@ -0,0 +1,35 @@
+{ 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;
+  };
+
+}