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 = [
|
imports = [
|
||||||
|
@ -36,11 +36,20 @@
|
||||||
ouch
|
ouch
|
||||||
];
|
];
|
||||||
|
|
||||||
environment.variables = {
|
environment.variables =
|
||||||
EDITOR = "nvim";
|
let
|
||||||
PAGER = "less";
|
editorconf =
|
||||||
LESS = "-X -R -F";
|
if config.services.emacs.defaultEditor then
|
||||||
};
|
{ }
|
||||||
|
else
|
||||||
|
{
|
||||||
|
EDITOR = "nvim";
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
PAGER = "less";
|
||||||
|
LESS = "-X -R -F";
|
||||||
|
} // editorconf;
|
||||||
|
|
||||||
environment.shellAliases = {
|
environment.shellAliases = {
|
||||||
ls = "ls --color=auto";
|
ls = "ls --color=auto";
|
||||||
|
|
|
@ -14,8 +14,9 @@
|
||||||
enable = false;
|
enable = false;
|
||||||
package = with pkgs; ((emacsPackagesFor emacsPgtk).emacsWithPackages (epkgs: with epkgs; [
|
package = with pkgs; ((emacsPackagesFor emacsPgtk).emacsWithPackages (epkgs: with epkgs; [
|
||||||
vterm
|
vterm
|
||||||
|
pdf-tools
|
||||||
]));
|
]));
|
||||||
defaultEditor = false;
|
defaultEditor = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue