adds lint and fix alias
This commit is contained in:
parent
f2f8decfe4
commit
0d7b278df2
1 changed files with 23 additions and 2 deletions
25
flake.nix
25
flake.nix
|
@ -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
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue