conditional default editor config
This commit is contained in:
parent
60d3e01199
commit
6048c1f7ad
2 changed files with 17 additions and 7 deletions
|
@ -1,4 +1,4 @@
|
|||
{ pkgs, ... }:
|
||||
{ pkgs, config, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
|
@ -36,11 +36,20 @@
|
|||
ouch
|
||||
];
|
||||
|
||||
environment.variables = {
|
||||
EDITOR = "nvim";
|
||||
PAGER = "less";
|
||||
LESS = "-X -R -F";
|
||||
};
|
||||
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";
|
||||
|
|
|
@ -14,8 +14,9 @@
|
|||
enable = false;
|
||||
package = with pkgs; ((emacsPackagesFor emacsPgtk).emacsWithPackages (epkgs: with epkgs; [
|
||||
vterm
|
||||
pdf-tools
|
||||
]));
|
||||
defaultEditor = false;
|
||||
defaultEditor = true;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue