Jump to content

Nano: Difference between revisions

From Official NixOS Wiki
Pigs (talk | contribs)
Create nano page
 
DHCP (talk | contribs)
m Configuration: fix indentation
 
Line 9: Line 9:
{{file|/etc/nixos/configuration.nix|nix|
{{file|/etc/nixos/configuration.nix|nix|
<nowiki>
<nowiki>
  programs.nano = {
programs.nano = {
    enable = true;
  enable = true;
    nanorc = ''
  nanorc = ''
      set nowrap
    set nowrap
      set tabstospaces
    set tabstospaces
      set tabsize 2
    set tabsize 2
    '';  
  '';  
  };
};
</nowiki>
</nowiki>
}}
}}

Latest revision as of 17:45, 19 July 2026

Nano is a simple, lightweight command-line text editor. It is a popular choice for quick edits in the terminal.

On NixOS, nano is installed by default.

Configuration

System-wide nano configurations are defined through the programs.nano.nanorc option. Refer to the nanorc man page for a full list of settings.

❄︎ /etc/nixos/configuration.nix
programs.nano = {
  enable = true;
  nanorc = ''
    set nowrap
    set tabstospaces
    set tabsize 2
  ''; 
};

For a full list of nano module options, see programs.nano.