migrated all languages to devshell

This commit is contained in:
2025-04-18 21:29:02 -06:00
parent ecb9f386ce
commit 023744a872
11 changed files with 256 additions and 94 deletions

View File

@@ -4,17 +4,35 @@
pkgs,
...
}:
let
packages = builtins.attrValues {
inherit (pkgs)
bashdb # Debugger and completion support
shellcheck # Shell script linter
shfmt # Shell parser and formatter
;
# LSP for Bash and sh
inherit (pkgs.nodePackages) bash-language-server;
};
in
{
options.my.dev.sh.enable = lib.mkEnableOption "enable";
options = {
my.dev.sh.enable = lib.mkEnableOption "Install shell scripting tools globally";
devShells.sh = lib.mkOption {
type = lib.types.package;
default = pkgs.mkShell {
inherit packages;
name = "sh-dev-shell";
shellHook = ''
echo "💻 Shell scripting dev environment"
'';
};
description = "Shell scripting dev shell";
};
};
config = lib.mkIf config.my.dev.sh.enable {
users.users.jawz.packages = builtins.attrValues {
inherit (pkgs)
bashdb # autocomplete
shellcheck # linting
shfmt # a shell parser and formatter
;
#LSP
inherit (pkgs.nodePackages) bash-language-server;
users.users.jawz = {
inherit packages;
};
};
}