Flatten programming directory a bit

Remove python and lua directories, combine into default

Swap pylsp for pyright language server
This commit is contained in:
Evie Litherland-Smith 2025-01-09 10:08:46 +00:00
parent a999a6b89f
commit b12192c062
8 changed files with 40 additions and 51 deletions

View file

@ -1,23 +1,45 @@
{ pkgs, ... }: { pkgs, ... }:
{ {
imports = [ home.packages =
./python/default.nix let
./lua/default.nix pythonEnv = (
]; pkgs.python312.withPackages (
home.packages = with pkgs; [ ps: with ps; [
## Linters flake8
shellcheck isort
yamllint numpy
scipy
xarray
netcdf4
matplotlib
]
)
);
luaEnv = (pkgs.luajit.withPackages (ps: [ (ps.callPackage ./luarocks/scilua.nix { }) ]));
in
with pkgs;
[
## Language Environments
pythonEnv
luaEnv
## Formatters ## Linters
nixfmt-rfc-style shellcheck
shfmt yamllint
nodePackages.prettier
nodePackages.prettier-plugin-toml
## Language servers ## Formatters
nixd nixfmt-rfc-style
rust-analyzer shfmt
nodePackages.typescript-language-server ruff
]; stylua
nodePackages.prettier
nodePackages.prettier-plugin-toml
## Language servers
nixd
pyright
lua-language-server
rust-analyzer
];
xdg.configFile."ruff/pyproject.toml".source = ./ruff.toml;
} }

View file

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

View file

@ -1,25 +0,0 @@
{ pkgs, ... }:
let
pythonEnv = (
pkgs.python312.withPackages (
ps: with ps; [
python-lsp-server
isort
flake8
mypy
numpy
scipy
xarray
netcdf4
matplotlib
]
)
);
in
{
home.packages = [
pkgs.ruff
pythonEnv
];
xdg.configFile."ruff/pyproject.toml".source = ./ruff.toml;
}