mirror of
https://github.com/nix-community/home-manager
synced 2024-11-23 11:39:46 +01:00
40 lines
1.3 KiB
Text
Executable file
40 lines
1.3 KiB
Text
Executable file
#! /usr/bin/env nix-shell
|
|
#! nix-shell -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/5edf5b60c3d8f82b5fc5e73e822b6f7460584945.tar.gz -i bash -p findutils nixfmt
|
|
|
|
CHECK_ARG=
|
|
|
|
case $1 in
|
|
-h)
|
|
echo "$0 [-c]"
|
|
;;
|
|
-c)
|
|
CHECK_ARG=-c
|
|
;;
|
|
esac
|
|
|
|
# The first block of excludes are files where nixfmt does a poor job,
|
|
# IMHO. The second block of excludes are files touched by open pull
|
|
# requests and we want to avoid merge conflicts.
|
|
find . -name '*.nix' \
|
|
! -path ./modules/programs/irssi.nix \
|
|
\
|
|
! -path ./home-manager/home-manager.nix \
|
|
! -path ./modules/default.nix \
|
|
! -path ./modules/files.nix \
|
|
! -path ./modules/home-environment.nix \
|
|
! -path ./modules/lib/default.nix \
|
|
! -path ./modules/lib/file-type.nix \
|
|
! -path ./modules/manual.nix \
|
|
! -path ./modules/misc/news.nix \
|
|
! -path ./modules/programs/bash.nix \
|
|
! -path ./modules/programs/gpg.nix \
|
|
! -path ./modules/programs/ssh.nix \
|
|
! -path ./modules/programs/tmux.nix \
|
|
! -path ./modules/programs/zsh.nix \
|
|
! -path ./modules/services/gpg-agent.nix \
|
|
! -path ./modules/services/mpd.nix \
|
|
! -path ./nix-darwin/default.nix \
|
|
! -path ./tests/default.nix \
|
|
! -path ./tests/modules/home-environment/session-variables.nix \
|
|
! -path ./tests/modules/programs/gpg/override-defaults.nix \
|
|
-exec nixfmt $CHECK_ARG {} +
|