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,10 +1,28 @@
{ pkgs, ... }:
{
imports = [
./python/default.nix
./lua/default.nix
];
home.packages = with pkgs; [
home.packages =
let
pythonEnv = (
pkgs.python312.withPackages (
ps: with ps; [
flake8
isort
numpy
scipy
xarray
netcdf4
matplotlib
]
)
);
luaEnv = (pkgs.luajit.withPackages (ps: [ (ps.callPackage ./luarocks/scilua.nix { }) ]));
in
with pkgs;
[
## Language Environments
pythonEnv
luaEnv
## Linters
shellcheck
yamllint
@ -12,12 +30,16 @@
## Formatters
nixfmt-rfc-style
shfmt
ruff
stylua
nodePackages.prettier
nodePackages.prettier-plugin-toml
## Language servers
nixd
pyright
lua-language-server
rust-analyzer
nodePackages.typescript-language-server
];
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;
}