refactor(nvim): nixify editor bash config
This commit is contained in:
+1
-2
@@ -5,8 +5,7 @@
|
|||||||
|
|
||||||
. /etc/os-release
|
. /etc/os-release
|
||||||
|
|
||||||
# Editor & prompt configuration
|
# Prompt configuration
|
||||||
[ -f "$HOME/.bashrc.d/editor" ] && . "$HOME/.bashrc.d/editor"
|
|
||||||
[ -f "$HOME/.bashrc.d/prompt" ] && . "$HOME/.bashrc.d/prompt"
|
[ -f "$HOME/.bashrc.d/prompt" ] && . "$HOME/.bashrc.d/prompt"
|
||||||
|
|
||||||
# Aliases {{{
|
# Aliases {{{
|
||||||
|
|||||||
@@ -1,7 +0,0 @@
|
|||||||
# shellcheck shell=bash
|
|
||||||
# vim: set ft=bash :
|
|
||||||
|
|
||||||
# Set NeoVim as default editor
|
|
||||||
export EDITOR=nvim
|
|
||||||
export SUDO_EDITOR="$EDITOR"
|
|
||||||
export SYSTEMD_EDITOR="$EDITOR"
|
|
||||||
@@ -6,15 +6,19 @@
|
|||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
|
||||||
cfg = config.nvim;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
options.nvim.enable = lib.mkEnableOption "nvim";
|
options.nvim.enable = lib.mkEnableOption "nvim";
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf config.nvim.enable {
|
||||||
home.packages = [
|
home = {
|
||||||
|
sessionVariables = {
|
||||||
|
EDITOR = "nvim";
|
||||||
|
SUDO_EDITOR = "nvim";
|
||||||
|
SYSTEMD_EDITOR = "nvim";
|
||||||
|
};
|
||||||
|
packages = [
|
||||||
inputs.nvim.packages.${pkgs.stdenv.hostPlatform.system}.nvim
|
inputs.nvim.packages.${pkgs.stdenv.hostPlatform.system}.nvim
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,7 +54,6 @@ in
|
|||||||
home.file = {
|
home.file = {
|
||||||
".inputrc".source = dotsPath + "/.inputrc";
|
".inputrc".source = dotsPath + "/.inputrc";
|
||||||
".bashrc.d/prompt".source = dotsPath + "/.bashrc.d/prompt";
|
".bashrc.d/prompt".source = dotsPath + "/.bashrc.d/prompt";
|
||||||
".bashrc.d/editor".source = dotsPath + "/.bashrc.d/editor";
|
|
||||||
}
|
}
|
||||||
// lib.optionalAttrs cfg.aliases.all {
|
// lib.optionalAttrs cfg.aliases.all {
|
||||||
".bash_aliases/all".source = dotsPath + "/.bash_aliases/all";
|
".bash_aliases/all".source = dotsPath + "/.bash_aliases/all";
|
||||||
|
|||||||
Reference in New Issue
Block a user