Split prog into python and lua

Make python/default.nix and lua/default.nix to replace
prog/default.nix for each respective language's packages

Move dev tools from prog into emacs/default.nix since that's what
they're relevant for.

Add some extra useful python packages (numpy, scipy, xarray,
matplotlib)

Add yamllint for YAML, associated flymake-yamllint for Emacs, remove
flymake-eslint since I'm not using it

Add lua-language-server and bash-language-server
This commit is contained in:
Evie Litherland-Smith 2024-05-13 11:58:11 +01:00
parent a9c5bcf7a3
commit 872c0b099c
10 changed files with 51 additions and 27 deletions

View file

@ -10,9 +10,10 @@
../programs/shell/default.nix
../programs/emacs/default.nix
../programs/firefox/default.nix
../programs/prog/default.nix
../programs/cava/default.nix
../programs/obs/default.nix
../programs/python/default.nix
../programs/lua/default.nix
# Services
../services/email/work.nix # TODO combine again at some point
../services/password-store/default.nix

View file

@ -78,8 +78,8 @@
treesit-auto
flymake-popon
flymake-collection
flymake-eslint
flymake-shellcheck
flymake-yamllint
apheleia
direnv
rainbow-delimiters
@ -165,5 +165,25 @@
(texlive.combine {
inherit (pkgs.texlive) scheme-medium dvisvgm dvipng wrapfig amsmath ulem hyperref capt-of;
})
# Development tools
# Python is a special case, installed separately
## Language servers
nil
fortls
lua-language-server
nodePackages.bash-language-server
## Linters
shellcheck
yamllint
## Formatters
alejandra
shfmt
black
isort
stylua
nodePackages.prettier
];
}

8
programs/lua/default.nix Normal file
View file

@ -0,0 +1,8 @@
{pkgs, ...}: {
home.packages = with pkgs; [
(lua.withPackages (ps: [
(ps.callPackage ./luarocks/scilua.nix {})
(ps.callPackage ./luarocks/graph-toolkit.nix {})
]))
];
}

View file

@ -1,25 +0,0 @@
{pkgs, ...}: {
xdg.configFile = {
"ruff/pyproject.toml".source = ./ruff.toml;
"pypoetry/config.toml".source = ./pypoetry.toml;
};
home.packages = with pkgs; [
# Nix
nil
alejandra
# Shell
shfmt
shellcheck
nodePackages.prettier
# Python
(python3.withPackages
(ps: with ps; [python-lsp-server flake8 mypy]))
black
isort
# FORTRAN
fortls
];
}

View file

@ -0,0 +1,20 @@
{pkgs, ...}: {
xdg.configFile = {
"ruff/pyproject.toml".source = ./ruff.toml;
"pypoetry/config.toml".source = ./pypoetry.toml;
};
home.packages = with pkgs; [
poetry
(python3.withPackages
(ps:
with ps; [
python-lsp-server
flake8
mypy
numpy
scipy
xarray
matplotlib
]))
];
}