conditional default editor config

This commit is contained in:
Grigory Shipunov 2023-05-01 07:50:13 +02:00
parent 60d3e01199
commit 6048c1f7ad
Signed by: 0xa
GPG key ID: 91FA5E5BF9AA901C
2 changed files with 17 additions and 7 deletions

View file

@ -1,4 +1,4 @@
{ pkgs, ... }:
{ pkgs, config, ... }:
{
imports = [
@ -36,11 +36,20 @@
ouch
];
environment.variables = {
environment.variables =
let
editorconf =
if config.services.emacs.defaultEditor then
{ }
else
{
EDITOR = "nvim";
};
in
{
PAGER = "less";
LESS = "-X -R -F";
};
} // editorconf;
environment.shellAliases = {
ls = "ls --color=auto";

View file

@ -14,8 +14,9 @@
enable = false;
package = with pkgs; ((emacsPackagesFor emacsPgtk).emacsWithPackages (epkgs: with epkgs; [
vterm
pdf-tools
]));
defaultEditor = false;
defaultEditor = true;
};
}