Merge pull request #530 from s0me1newithhand7s/main

refactor(nix): devShells.(system).default init
This commit is contained in:
Lysec
2025-10-25 21:40:51 +02:00
committed by GitHub
3 changed files with 43 additions and 0 deletions

View File

@@ -73,6 +73,10 @@ We welcome contributions of any size - bug fixes, new features, documentation im
- **Want to code?** Check out our [development guidelines](https://docs.noctalia.dev/development/guideline)
- **Need help?** Join our [Discord](https://discord.noctalia.dev)
### ✨ Nix DevShell (new)
Nix users can use the flake's devShell to access a development environment. Run nix develop the repo root to enter the dev shell. In includes packages, utilities and environment variables needed to develop Noctalia.
---
## 💜 Credits

View File

@@ -38,6 +38,14 @@
defaultPackage = eachSystem (system: self.packages.${system}.default);
devShells = eachSystem (
system: let
pkgs = nixpkgs.legacyPackages.${system};
in {
default = pkgs.callPackage ./shell.nix {};
}
);
homeModules.default = {
pkgs,
lib,

31
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
];
}