adds lint and fix alias

nixos
Moritz Böhme 2021-11-22 11:13:18 +01:00
parent f2f8decfe4
commit 0d7b278df2
1 changed files with 23 additions and 2 deletions

View File

@ -16,6 +16,8 @@
home-manager.url = "github:nix-community/home-manager";
statix.url = "github:nerdypepper/statix";
picom = {
url = "github:jonaburg/picom";
flake = false;
@ -84,8 +86,27 @@
with channels.nixpkgs; {
devShell = mkShell {
name = "dotfiles";
packages =
[ nixpkgs-fmt agenix.defaultPackage.x86_64-linux cachix ];
shellHook = ''
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
];
};
};
};