nix-config/nix/devshell.nix

70 lines
1.3 KiB
Nix
Raw Normal View History

2024-07-26 22:12:48 +02:00
{ self, ... }:
system:
let
2023-09-25 21:28:30 +02:00
pkgs = self.pkgs.${system};
in
2024-07-26 22:12:48 +02:00
pkgs.devshell.mkShell {
name = "nix-config";
packages = with pkgs; [
# Nix
nil
2024-07-26 22:12:48 +02:00
# Misc
shellcheck
pre-commit
rage
nix
nix-diff
nix-update
];
commands = [
{
package = pkgs.deploy;
help = "build and deploy nix configurations";
}
{
package = pkgs.agenix-rekey;
help = "Edit and rekey repository secrets";
}
{
package = pkgs.nixfmt-rfc-style;
help = "Format nix code";
}
{
package = pkgs.statix;
help = "Linter for nix";
}
{
package = pkgs.deadnix;
help = "Remove dead nix code";
}
{
package = pkgs.nix-tree;
help = "Show nix closure tree";
}
{
package = pkgs.update-nix-fetchgit;
help = "Update fetcher inside nix files";
}
{
package = pkgs.nvd;
help = "List package differences between systems";
}
{
package = pkgs.vulnix;
help = "List vulnerabilities found in your system";
}
];
env = [
{
name = "NIX_CONFIG";
value = ''
plugin-files = ${pkgs.nix-plugins}/lib/nix/plugins
extra-builtins-file = ${../nix}/extra-builtins.nix
'';
}
];
2024-07-26 22:12:48 +02:00
devshell.startup.pre-commit.text = self.checks.${system}.pre-commit-check.shellHook;
}