Configuration is now held by the `.org` files. All `.nix` files are tangled from the org-mode files.
1.9 KiB
1.9 KiB
Nano
Nano
I mostly live in Emacs, but I still want a sane fallback editor for
quick edits over SSH. Here’s the nixos.nano module.
{
flake.modules.nixos.nano = {
programs.nano = {
<<enable-nano>>
<<syntax-highlight>>
<<nanorc>>
};
};
}
Enabling Nano
enable = true;
Configuration
First of all, let’s enable syntax highlighting. Nothing fancy here, the basics are enough.
syntaxHighlight = true;
A handful of nanorc settings make it behave a bit more like a modern
editor.
| Setting | Why |
|---|---|
tabsize 2 |
Two spaces per tab, matching how I indent code |
autoindent |
Keep a new line at the same indentation as the one above it |
atblanks |
Let soft-wrapped lines indent to match the line above, blanks too |
linenumbers |
Show line numbers in the margin |
smarthome |
Make Home jump to the first non-blank character, not column 0 |
softwrap |
Wrap long lines visually instead of running them off-screen |
set tabsize 2 set autoindent set atblanks set linenumbers set smarthome set softwrap
nanorc = ''
<<make-nanorc()>>
'';