diff --git a/system/home/programming/default.nix b/system/home/programming/default.nix index a012f1f4..b17c2111 100644 --- a/system/home/programming/default.nix +++ b/system/home/programming/default.nix @@ -1,23 +1,45 @@ { pkgs, ... }: { - imports = [ - ./python/default.nix - ./lua/default.nix - ]; - home.packages = with pkgs; [ - ## Linters - shellcheck - yamllint + 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 - ## Formatters - nixfmt-rfc-style - shfmt - nodePackages.prettier - nodePackages.prettier-plugin-toml + ## Linters + shellcheck + yamllint - ## Language servers - nixd - rust-analyzer - nodePackages.typescript-language-server - ]; + ## Formatters + nixfmt-rfc-style + shfmt + 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; } diff --git a/system/home/programming/lua/default.nix b/system/home/programming/lua/default.nix deleted file mode 100644 index 7b78e4c0..00000000 --- a/system/home/programming/lua/default.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ pkgs, ... }: -{ - home.packages = with pkgs; [ - (luajit.withPackages (ps: [ (ps.callPackage ./luarocks/scilua.nix { }) ])) - lua-language-server - stylua - ]; -} diff --git a/system/home/programming/lua/luarocks/graph-toolkit.nix b/system/home/programming/luarocks/graph-toolkit.nix similarity index 100% rename from system/home/programming/lua/luarocks/graph-toolkit.nix rename to system/home/programming/luarocks/graph-toolkit.nix diff --git a/system/home/programming/lua/luarocks/scilua.nix b/system/home/programming/luarocks/scilua.nix similarity index 100% rename from system/home/programming/lua/luarocks/scilua.nix rename to system/home/programming/luarocks/scilua.nix diff --git a/system/home/programming/lua/luarocks/xsys.nix b/system/home/programming/luarocks/xsys.nix similarity index 100% rename from system/home/programming/lua/luarocks/xsys.nix rename to system/home/programming/luarocks/xsys.nix diff --git a/system/home/programming/python/pyshell.nix b/system/home/programming/pyshell.nix similarity index 100% rename from system/home/programming/python/pyshell.nix rename to system/home/programming/pyshell.nix diff --git a/system/home/programming/python/default.nix b/system/home/programming/python/default.nix deleted file mode 100644 index 1f3413d9..00000000 --- a/system/home/programming/python/default.nix +++ /dev/null @@ -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; -} diff --git a/system/home/programming/python/ruff.toml b/system/home/programming/ruff.toml similarity index 100% rename from system/home/programming/python/ruff.toml rename to system/home/programming/ruff.toml