nix-config/nix/devshell.nix

81 lines
1.7 KiB
Nix
Raw Normal View History

{
self,
devshell,
agenix-rekey,
...
}: system: let
2023-09-25 21:28:30 +02:00
pkgs = self.pkgs.${system};
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
2023-09-02 20:11:06 +02:00
nix
2024-03-30 20:34:44 +01:00
nix-diff
];
2023-09-25 21:28:30 +02:00
commands = [
{
2023-09-25 21:28:30 +02:00
package = pkgs.deploy;
help = "build and deploy nix configurations";
}
2023-11-08 22:37:07 +01:00
{
package = pkgs.minify;
help = "build and deploy nix configurations";
}
{
package = pkgs.agenix-rekey;
help = "Edit and rekey repository secrets";
}
{
2023-09-25 21:28:30 +02:00
package = pkgs.alejandra;
help = "Format nix code";
}
{
2023-09-25 21:28:30 +02:00
package = pkgs.statix;
help = "Linter for nix";
}
{
2023-09-25 21:28:30 +02:00
package = pkgs.deadnix;
help = "Remove dead nix code";
}
2023-09-26 22:25:58 +02:00
{
package = pkgs.nix-tree;
help = "Show nix closure tree";
}
{
2023-09-25 21:28:30 +02:00
package = pkgs.update-nix-fetchgit;
help = "Update fetcher inside nix files";
}
2023-11-06 12:27:13 +01:00
{
package = pkgs.nvd;
help = "List package differences between systems";
}
{
package = pkgs.vulnix;
help = "List vulnerabilities found in your system";
}
];
env = [
{
name = "NIX_CONFIG";
value = ''
2023-09-02 20:11:06 +02:00
plugin-files = ${pkgs.nix-plugins}/lib/nix/plugins
extra-builtins-file = ${../nix}/extra-builtins.nix
'';
}
];
devshell.startup.pre-commit.text = self.checks.${system}.pre-commit-check.shellHook;
}