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";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue