refactor: switch formatter from nixpkgs-fmt to alejandra
This commit is contained in:
@@ -37,7 +37,7 @@ Personal Nix flake: custom packages, overlays, NixOS/Home Manager modules, dev s
|
||||
|
||||
## CONVENTIONS
|
||||
|
||||
**Formatter**: `nix fmt` before commit (nixpkgs-fmt)
|
||||
**Formatter**: `nix fmt` before commit (alejandra)
|
||||
|
||||
**Naming**:
|
||||
- Packages: `lowercase-hyphen` (e.g., `hyprpaper-random`)
|
||||
@@ -105,7 +105,7 @@ Generated: `/etc/m3ta/ports.json` (NixOS), `~/.config/m3ta/ports.json` (HM)
|
||||
|
||||
```bash
|
||||
nix flake check # Validate flake
|
||||
nix fmt # Format (nixpkgs-fmt)
|
||||
nix fmt # Format (alejandra)
|
||||
nix build .#<pkg> # Build package
|
||||
nix flake show # List outputs
|
||||
nix develop # Enter dev shell
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
# Formatter for 'nix fmt'
|
||||
formatter = forAllSystems (
|
||||
system:
|
||||
(pkgsFor system).nixpkgs-fmt
|
||||
(pkgsFor system).alejandra
|
||||
);
|
||||
|
||||
# Templates for creating new packages/modules
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
buildInputs = with pkgs; [
|
||||
nil # Nix LSP
|
||||
nixpkgs-fmt # Nix formatter
|
||||
alejandra # Nix formatter
|
||||
nix-tree # Explore dependency trees
|
||||
statix # Nix linter
|
||||
deadnix # Find dead Nix code
|
||||
@@ -20,7 +20,7 @@
|
||||
echo " nix flake check - Check flake validity"
|
||||
echo " nix flake show - Show flake outputs"
|
||||
echo " nix build .#<pkg> - Build a package"
|
||||
echo " nixpkgs-fmt . - Format Nix files"
|
||||
echo " nix fmt . - Format Nix files"
|
||||
echo " statix check . - Lint Nix files"
|
||||
echo " deadnix . - Find dead code"
|
||||
'';
|
||||
|
||||
Reference in New Issue
Block a user