Add some command line utilities, LSP servers, switch to neovim as default editor
This commit is contained in:
parent
2cc0edde25
commit
614f8d5a9f
|
|
@ -94,7 +94,9 @@ in
|
|||
pass-wayland
|
||||
thunderbird
|
||||
|
||||
ripgrep
|
||||
yazi
|
||||
ncdu
|
||||
|
||||
# Just for utils
|
||||
pulseaudio
|
||||
|
|
@ -181,6 +183,7 @@ in
|
|||
script = pkgs.writeShellScript "emacs-config-initialiser-script"
|
||||
''
|
||||
if [[ ! -d $HOME/.emacs.d ]]; then
|
||||
mkdir -p $HOME/.emacs.d
|
||||
git clone https://git.cspark.dev/cspark/Emacs-Configuration $HOME/.emacs.d
|
||||
else
|
||||
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)
|
||||
services.emacs = {
|
||||
enable = true;
|
||||
|
|
@ -247,7 +274,8 @@ in
|
|||
];
|
||||
|
||||
home.sessionVariables = {
|
||||
EDITOR = "emacsclient -nw";
|
||||
# EDITOR = "emacsclient -nw";
|
||||
EDITOR = "nvim";
|
||||
|
||||
# Dotnet path not found fix
|
||||
DOTNET_ROOT = "${pkgs.dotnet-sdk}";
|
||||
|
|
|
|||
31
global.nix
31
global.nix
|
|
@ -15,10 +15,8 @@
|
|||
git
|
||||
gcc
|
||||
|
||||
# Web Stuff
|
||||
# Programming Stuff, language servers etc
|
||||
nodejs
|
||||
nodePackages.prettier
|
||||
nodePackages.typescript-language-server
|
||||
typescript
|
||||
deno
|
||||
# Purely for the tooling
|
||||
|
|
@ -29,6 +27,12 @@
|
|||
lldb_18 # For lldb-dap
|
||||
clang-tools # clangd
|
||||
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.
|
||||
fastfetch
|
||||
|
|
@ -173,6 +177,7 @@
|
|||
};
|
||||
script = "
|
||||
if [[ ! -d $HOME/.emacs.d ]]; then
|
||||
mkdir -p $HOME/.emacs.d
|
||||
git clone https://git.cspark.dev/cspark/Emacs-Configuration $HOME/.emacs.d
|
||||
else
|
||||
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.
|
||||
services.emacs = {
|
||||
enable = true;
|
||||
|
|
|
|||
Loading…
Reference in New Issue