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, ... }: { pkgs, ... }:
{ {
imports = [ home.packages =
./python/default.nix let
./lua/default.nix pythonEnv = (
]; pkgs.python312.withPackages (
home.packages = with pkgs; [ 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 ## Linters
shellcheck shellcheck
yamllint yamllint
@ -12,12 +30,16 @@
## Formatters ## Formatters
nixfmt-rfc-style nixfmt-rfc-style
shfmt shfmt
ruff
stylua
nodePackages.prettier nodePackages.prettier
nodePackages.prettier-plugin-toml nodePackages.prettier-plugin-toml
## Language servers ## Language servers
nixd nixd
pyright
lua-language-server
rust-analyzer 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;
}