From 5f300e4c0eb201853408fb08944db78ede82f38c Mon Sep 17 00:00:00 2001 From: Dmitry Voronin Date: Sat, 24 Feb 2024 20:25:27 +0300 Subject: [PATCH] Nvim : Partially move config to nix. --- .config/bash/module/Export.sh | 28 ++----------------- .config/linux/system/flake.nix | 2 ++ .../system/module/common/Environment.nix | 7 +++++ .config/linux/system/module/common/Neovim.nix | 5 ++++ .../linux/system/module/common/Package.nix | 1 - 5 files changed, 16 insertions(+), 27 deletions(-) create mode 100644 .config/linux/system/module/common/Environment.nix create mode 100644 .config/linux/system/module/common/Neovim.nix diff --git a/.config/bash/module/Export.sh b/.config/bash/module/Export.sh index c986345..e94d484 100644 --- a/.config/bash/module/Export.sh +++ b/.config/bash/module/Export.sh @@ -1,31 +1,7 @@ -# Set umask. -umask 077 - -# add all links in ~/app/bin/ +# Add all links in ~/app/bin/ export PATH=$( find -L ${HOME}/app/bin/ -type d -printf ":%p" 2> /dev/null ):${PATH} -# specify locale. -#export LC_ALL=C -# export LANGUAGE="en_US.UTF-8" - -# specify editor. -export EDITOR=nvim - -# specify man page viewer. -export MANPAGER="nvim +Man!" - -# specify android sdk root. -# export ANDROID_SDK_ROOT="$HOME/.android/sdk" - -# specify java path. -# export JAVA_HOME="${HOME}/app/java/x64/latest" - -# specify tex paths. -# export TEXMFVAR="${HOME}/app/tex/data/var" -# export TEXMFCONFIG="${HOME}/app/tex/data/config" -# export TEXMFLOCAL="${HOME}/app/tex/data/local" - -# Dotfiles exports. +# Bash modules. export BASH_MODULE_PATH="${HOME}/.config/bash/module" # Docker config. diff --git a/.config/linux/system/flake.nix b/.config/linux/system/flake.nix index c6ec2be..c7af9bd 100644 --- a/.config/linux/system/flake.nix +++ b/.config/linux/system/flake.nix @@ -19,12 +19,14 @@ ./module/common/Bootloader.nix ./module/common/Distrobox.nix ./module/common/Dotfiles.nix + ./module/common/Environment.nix ./module/common/Filesystem.nix ./module/common/Firefox.nix ./module/common/Firewall.nix ./module/common/Git.nix ./module/common/Kernel.nix ./module/common/Locale.nix + ./module/common/Neovim.nix ./module/common/Network.nix ./module/common/Nix.nix ./module/common/Package.nix diff --git a/.config/linux/system/module/common/Environment.nix b/.config/linux/system/module/common/Environment.nix new file mode 100644 index 0000000..4f46472 --- /dev/null +++ b/.config/linux/system/module/common/Environment.nix @@ -0,0 +1,7 @@ +{ environment, ... }: { + security.loginDefs.settings.UMASK = "077"; + environment.values = { + EDITOR = "nvim"; + MANPAGER = "nvim +Man!"; + }; +} diff --git a/.config/linux/system/module/common/Neovim.nix b/.config/linux/system/module/common/Neovim.nix new file mode 100644 index 0000000..16be33a --- /dev/null +++ b/.config/linux/system/module/common/Neovim.nix @@ -0,0 +1,5 @@ +{ ... }: { + programs.neovim = { + enable = true; + }; +} diff --git a/.config/linux/system/module/common/Package.nix b/.config/linux/system/module/common/Package.nix index 11347a4..48ff1a7 100644 --- a/.config/linux/system/module/common/Package.nix +++ b/.config/linux/system/module/common/Package.nix @@ -20,7 +20,6 @@ lsof ltex-ls ncdu - neovim nmap parallel parted