diff options
author | Katharina Fey <kookie@spacekookie.de> | 2020-02-03 10:05:30 +0100 |
---|---|---|
committer | Katharina Fey <kookie@spacekookie.de> | 2020-02-03 10:05:30 +0100 |
commit | c488527c95c874d3b8743c915173ad7bfb05d5af (patch) | |
tree | 2b874dc5606a9dff44096a5e8557f00dc52ac2b6 /home-manager/format | |
parent | 899a451e08f7d6d2c8214d119c2a0316849a0ed4 (diff) | |
parent | 6cc4fd6ede4909226cb81d3475834251ed1b7210 (diff) |
Merge commit '6cc4fd6ede4909226cb81d3475834251ed1b7210'
Diffstat (limited to 'home-manager/format')
-rwxr-xr-x | home-manager/format | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/home-manager/format b/home-manager/format new file mode 100755 index 00000000000..539ae60de22 --- /dev/null +++ b/home-manager/format @@ -0,0 +1,70 @@ +#! /usr/bin/env nix-shell +#! nix-shell -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/default.nix \ + ! -path ./home-manager/home-manager.nix \ + ! -path ./modules/accounts/email.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/lib/types.nix \ + ! -path ./modules/manual.nix \ + ! -path ./modules/misc/dconf.nix \ + ! -path ./modules/misc/gtk.nix \ + ! -path ./modules/misc/news.nix \ + ! -path ./modules/misc/nixpkgs.nix \ + ! -path ./modules/misc/xdg.nix \ + ! -path ./modules/modules.nix \ + ! -path ./modules/programs/afew.nix \ + ! -path ./modules/programs/alot.nix \ + ! -path ./modules/programs/bash.nix \ + ! -path ./modules/programs/emacs.nix \ + ! -path ./modules/programs/firefox.nix \ + ! -path ./modules/programs/fish.nix \ + ! -path ./modules/programs/gpg.nix \ + ! -path ./modules/programs/lesspipe.nix \ + ! -path ./modules/programs/neovim.nix \ + ! -path ./modules/programs/ssh.nix \ + ! -path ./modules/programs/tmux.nix \ + ! -path ./modules/programs/vscode.nix \ + ! -path ./modules/programs/zsh.nix \ + ! -path ./modules/services/gpg-agent.nix \ + ! -path ./modules/services/kbfs.nix \ + ! -path ./modules/services/keybase.nix \ + ! -path ./modules/services/mpd.nix \ + ! -path ./modules/services/sxhkd.nix \ + ! -path ./modules/services/window-managers/i3.nix \ + ! -path ./modules/systemd.nix \ + ! -path ./nix-darwin/default.nix \ + ! -path ./tests/default.nix \ + ! -path ./tests/modules/home-environment/default.nix \ + ! -path ./tests/modules/home-environment/session-variables.nix \ + ! -path ./tests/modules/programs/gpg/override-defaults.nix \ + ! -path ./tests/modules/programs/tmux/default.nix \ + ! -path ./tests/modules/programs/tmux/disable-confirmation-prompt.nix \ + ! -path ./tests/modules/programs/tmux/secure-socket-enabled.nix \ + ! -path ./tests/modules/programs/zsh/session-variables.nix \ + ! -path ./tests/modules/services/sxhkd/service.nix \ + ! -path ./tests/modules/systemd/default.nix \ + ! -path ./tests/modules/systemd/services.nix \ + ! -path ./tests/modules/systemd/session-variables.nix \ + -exec nixfmt $CHECK_ARG {} + |