nixos-config/modules/vim/default.nix

29 lines
588 B
Nix
Raw Normal View History

2023-09-15 17:19:18 +00:00
{ config, lib, pkgs, ... }:
{
2023-10-03 16:27:34 +00:00
environment.variables.EDITOR = "vim";
2023-09-20 17:55:22 +00:00
2023-10-03 16:27:34 +00:00
environment.etc."lvim.lua".source = ./init.lua;
environment.etc."my-settings.sh".text = ''
mkdir -p ~/.config/lvim
echo 'vim.cmd("luafile /etc/lvim.lua")' >~/.config/lvim/config.lua
'';
2023-09-15 17:19:18 +00:00
environment.systemPackages = with pkgs; [
2023-10-03 16:27:34 +00:00
lunarvim
2023-09-15 17:19:18 +00:00
nodePackages.prettier
2023-10-03 16:27:34 +00:00
2023-09-15 17:19:18 +00:00
(writeShellScriptBin "black" ''
exec ${pkgs.python3.pkgs.black}/bin/black "$@"
'')
2023-10-03 16:27:34 +00:00
(writeShellScriptBin "vi" ''
exec lvim "$@"
'')
(writeShellScriptBin "vim" ''
exec lvim "$@"
'')
2023-09-15 17:19:18 +00:00
];
}