fix(nix): fix shell.nix for non flake nix-shell invocation

- relocated shell.nix to nix/shell.nix
- initialized shell.nix at root to correctly invoke the shell with
  `nix-shell` command for non flake
This commit is contained in:
Rexiel Scarlet
2025-11-10 22:15:29 +04:00
parent 8028deb1ed
commit 4ade4e91e6
3 changed files with 33 additions and 32 deletions

View File

@@ -42,7 +42,7 @@
system: let system: let
pkgs = nixpkgs.legacyPackages.${system}; pkgs = nixpkgs.legacyPackages.${system};
in { in {
default = pkgs.callPackage ./shell.nix {}; default = pkgs.callPackage ./nix/shell.nix {};
} }
); );

31
nix/shell.nix Normal file
View File

@@ -0,0 +1,31 @@
{
alejandra,
statix,
deadnix,
shfmt,
shellcheck,
jsonfmt,
lefthook,
kdePackages,
mkShellNoCC,
}:
mkShellNoCC {
#it's faster than mkDerivation / mkShell
packages = [
# nix
alejandra # formatter
statix # linter
deadnix # linter
# shell
shfmt # formatter
shellcheck # linter
# json
jsonfmt # formatter
# CoC
lefthook # githooks
kdePackages.qtdeclarative # qmlfmt, qmllint, qmlls and etc; Qt6
];
}

View File

@@ -1,31 +1 @@
{ (import <nixpkgs> {}).callPackage ./nix/shell.nix {}
alejandra,
statix,
deadnix,
shfmt,
shellcheck,
jsonfmt,
lefthook,
kdePackages,
mkShellNoCC,
}:
mkShellNoCC {
#it's faster than mkDerivation / mkShell
packages = [
# nix
alejandra # formatter
statix # linter
deadnix # linter
# shell
shfmt # formatter
shellcheck # linter
# json
jsonfmt # formatter
# CoC
lefthook # githooks
kdePackages.qtdeclarative # qmlfmt, qmllint, qmlls and etc; Qt6
];
}