adds lint and fix alias

This commit is contained in:
Moritz Böhme 2021-11-22 11:13:18 +01:00
parent f2f8decfe4
commit 0d7b278df2

View file

@ -16,6 +16,8 @@
home-manager.url = "github:nix-community/home-manager"; home-manager.url = "github:nix-community/home-manager";
statix.url = "github:nerdypepper/statix";
picom = { picom = {
url = "github:jonaburg/picom"; url = "github:jonaburg/picom";
flake = false; flake = false;
@ -84,8 +86,27 @@
with channels.nixpkgs; { with channels.nixpkgs; {
devShell = mkShell { devShell = mkShell {
name = "dotfiles"; name = "dotfiles";
packages = shellHook = ''
[ nixpkgs-fmt agenix.defaultPackage.x86_64-linux cachix ]; alias "lint"='echo "Running nixpkgs-fmt ..."
nixpkgs-fmt --check $(find . -name "*.nix")
echo ""
echo "Running statix ..."
statix check'
alias "fix"='echo "Running nixpkgs-fmt ..."
nixpkgs-fmt $(find . -name "*.nix")
echo ""
echo "Running statix ..."
statix fix'
'';
packages = [
# Linting
nixpkgs-fmt
statix
# Secrets
agenix.defaultPackage.x86_64-linux
# chachix
cachix
];
}; };
}; };
}; };