nix-config/nix/dev-shell.nix
Patrick Großmann da45ef9ecd
chore: improved devshell
fix: daily garbage collection
2023-05-23 14:45:57 +09:00

52 lines
955 B
Nix

{
self,
nixpkgs,
colmena,
devshell,
...
}: system: let
pkgs = import nixpkgs {
inherit system;
overlays = [devshell.overlays.default];
};
in
pkgs.devshell.mkShell {
name = "nix-config";
packages = with pkgs; [
# Nix
nil
# Lua
stylua
(luajit.withPackages (p: with p; [luacheck]))
lua-language-server
# Misc
shellcheck
pre-commit
rage
];
commands = with pkgs; [
{
package =
colmena.packages.${system}.colmena;
help = "Apply nix configurations";
}
{
package =
alejandra;
help = "Format nix code";
}
{
package = statix;
help = "Linter for nix";
}
{
package = update-nix-fetchgit;
help = "Update fetcher inside nix files";
}
];
devshell.startup.pre-commit.text = self.checks.${system}.pre-commit-check.shellHook;
}