Add some command line utilities, LSP servers, switch to neovim as default editor

This commit is contained in:
Curt Spark 2024-07-18 05:58:27 +01:00
parent 2cc0edde25
commit 614f8d5a9f
2 changed files with 57 additions and 4 deletions

View File

@ -94,7 +94,9 @@ in
pass-wayland pass-wayland
thunderbird thunderbird
ripgrep
yazi yazi
ncdu
# Just for utils # Just for utils
pulseaudio pulseaudio
@ -181,6 +183,7 @@ in
script = pkgs.writeShellScript "emacs-config-initialiser-script" script = pkgs.writeShellScript "emacs-config-initialiser-script"
'' ''
if [[ ! -d $HOME/.emacs.d ]]; then if [[ ! -d $HOME/.emacs.d ]]; then
mkdir -p $HOME/.emacs.d
git clone https://git.cspark.dev/cspark/Emacs-Configuration $HOME/.emacs.d git clone https://git.cspark.dev/cspark/Emacs-Configuration $HOME/.emacs.d
else else
exit 0 exit 0
@ -199,6 +202,30 @@ in
}; };
}; };
# Neovim Config Init Service
systemd.user.services.neovim-config-initialiser = let
script = pkgs.writeShellScript "neovim-config-initialiser-script"
''
if [[ ! -d $HOME/.config/neovim ]]; then
mkdir -p $HOME/.config/neovim
git clone https://git.cspark.dev/cspark/Neovim-Configuration $HOME/.config/neovim
else
exit 0
fi
'';
in
{
Unit = {
Description = "Initialises default neovim configuration if not available";
};
Service = {
ExecStart = "${script}";
};
Install = {
WantedBy = [ "default.target" ];
};
};
# Emacs install and enable daemon/server mode. Set to use unstable pure gtk branch (From emacs-overlay) # Emacs install and enable daemon/server mode. Set to use unstable pure gtk branch (From emacs-overlay)
services.emacs = { services.emacs = {
enable = true; enable = true;
@ -247,7 +274,8 @@ in
]; ];
home.sessionVariables = { home.sessionVariables = {
EDITOR = "emacsclient -nw"; # EDITOR = "emacsclient -nw";
EDITOR = "nvim";
# Dotnet path not found fix # Dotnet path not found fix
DOTNET_ROOT = "${pkgs.dotnet-sdk}"; DOTNET_ROOT = "${pkgs.dotnet-sdk}";

View File

@ -15,10 +15,8 @@
git git
gcc gcc
# Web Stuff # Programming Stuff, language servers etc
nodejs nodejs
nodePackages.prettier
nodePackages.typescript-language-server
typescript typescript
deno deno
# Purely for the tooling # Purely for the tooling
@ -29,6 +27,12 @@
lldb_18 # For lldb-dap lldb_18 # For lldb-dap
clang-tools # clangd clang-tools # clangd
gnumake gnumake
cargo
lua-language-server
nodePackages.prettier
nodePackages.typescript-language-server
nodePackages.bash-language-server
python312Packages.jedi-language-server
neovim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. neovim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
fastfetch fastfetch
@ -173,6 +177,7 @@
}; };
script = " script = "
if [[ ! -d $HOME/.emacs.d ]]; then if [[ ! -d $HOME/.emacs.d ]]; then
mkdir -p $HOME/.emacs.d
git clone https://git.cspark.dev/cspark/Emacs-Configuration $HOME/.emacs.d git clone https://git.cspark.dev/cspark/Emacs-Configuration $HOME/.emacs.d
else else
exit 0 exit 0
@ -180,6 +185,26 @@
"; ";
}; };
# Neovim Config Init Service - For root user also
systemd.services.neovim-config-initialiser = {
description = "Initialises default neovim configuration if not available";
wantedBy = [ "multi-user.target" ];
path = with pkgs; [ coreutils git ];
enable = true;
serviceConfig = {
User = "root";
Group = "root";
};
script = "
if [[ ! -d $HOME/.config/neovim ]]; then
mkdir -p $HOME/.config/neovim
git clone https://git.cspark.dev/cspark/Neovim-Configuration $HOME/.neovim.d
else
exit 0
fi
";
};
# Emacs install and enable daemon/server mode. # Emacs install and enable daemon/server mode.
services.emacs = { services.emacs = {
enable = true; enable = true;