fix(make): find sans résultat bloquait sur stdin
- xargs -0 -r sur toutes les cibles : si find ne retourne rien, nixfmt/shfmt lisaient stdin et make fmt/check restait bloqué (testé et reproduit avant correction) - CLAUDE.md : retire la ligne shell.nix (fichier inexistant)
This commit is contained in:
@@ -13,7 +13,6 @@ NixOS dotfiles for Pierre MARTIN (Lundi Matin — Front-Commerce, LMB, NEIA), us
|
|||||||
- `packages.nix` — Tous les packages utilisateur (avec allowlist unfree).
|
- `packages.nix` — Tous les packages utilisateur (avec allowlist unfree).
|
||||||
- `programs/` — Modules home-manager par programme : `git.nix`, `zsh.nix`, `i3.nix`, `neia.nix`.
|
- `programs/` — Modules home-manager par programme : `git.nix`, `zsh.nix`, `i3.nix`, `neia.nix`.
|
||||||
- `files/` — Fichiers de config statiques copiés dans `$HOME` par home-manager (`.npmrc`, `traefik.toml`, etc.).
|
- `files/` — Fichiers de config statiques copiés dans `$HOME` par home-manager (`.npmrc`, `traefik.toml`, etc.).
|
||||||
- `shell.nix` — Dev shell pour travailler sur les dotfiles eux-mêmes.
|
|
||||||
|
|
||||||
Home-manager est intégré au module NixOS (pas standalone). Appliquer avec `sudo nixos-rebuild switch`.
|
Home-manager est intégré au module NixOS (pas standalone). Appliquer avec `sudo nixos-rebuild switch`.
|
||||||
|
|
||||||
|
|||||||
@@ -7,21 +7,21 @@ all: fmt lint
|
|||||||
fmt: fmt-nix fmt-shell
|
fmt: fmt-nix fmt-shell
|
||||||
|
|
||||||
fmt-nix:
|
fmt-nix:
|
||||||
find . -name '*.nix' -not -path './.direnv/*' | xargs nixfmt
|
find . -name '*.nix' -not -path './.direnv/*' -print0 | xargs -0 -r nixfmt
|
||||||
|
|
||||||
fmt-shell:
|
fmt-shell:
|
||||||
find . -name '*.sh' -not -path './.direnv/*' | xargs shfmt -w -i 2
|
find . -name '*.sh' -not -path './.direnv/*' -print0 | xargs -0 -r shfmt -w -i 2
|
||||||
|
|
||||||
# Validation
|
# Validation
|
||||||
lint: lint-shell
|
lint: lint-shell
|
||||||
|
|
||||||
lint-shell:
|
lint-shell:
|
||||||
find . -name '*.sh' -not -path './.direnv/*' | xargs shellcheck
|
find . -name '*.sh' -not -path './.direnv/*' -print0 | xargs -0 -r shellcheck
|
||||||
|
|
||||||
# Vérification sans modification
|
# Vérification sans modification
|
||||||
check:
|
check:
|
||||||
find . -name '*.nix' -not -path './.direnv/*' | xargs nixfmt --check
|
find . -name '*.nix' -not -path './.direnv/*' -print0 | xargs -0 -r nixfmt --check
|
||||||
find . -name '*.sh' -not -path './.direnv/*' | xargs shfmt -d -i 2
|
find . -name '*.sh' -not -path './.direnv/*' -print0 | xargs -0 -r shfmt -d -i 2
|
||||||
|
|
||||||
# Nettoyage
|
# Nettoyage
|
||||||
clean:
|
clean:
|
||||||
|
|||||||
Reference in New Issue
Block a user