Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/renerocksai/aerc-flake.nix
https://github.com/renerocksai/aerc-flake.nix
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/renerocksai/aerc-flake.nix
- Owner: renerocksai
- License: mit
- Created: 2024-10-18T00:34:56.000Z (3 months ago)
- Default Branch: master
- Last Pushed: 2024-10-18T00:35:50.000Z (3 months ago)
- Last Synced: 2024-11-26T22:57:05.228Z (2 months ago)
- Language: Nix
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# aerc-flake.nix
This flake installs [aerc](https://aerc-mail.org) and required additional
commands from NixOS-21.11 release packages. In addition, it creates
`~/.aerc-tools/`, and puts symlinks to all installed commands in there.It adds aerc's filter directory to the path, as well as the newly created aerc
tools directory.This allows you to write filters that use commands like awk, bash, socksify, etc
in shebang lines in filters, without having to know nix store location of aerc
or any other package.It also allows you to re-use existing aerc filters, like `.html-wrapped` in your
own filters.For instance, here is my `~/.config/aerc/filters/html`:
```bash
#!/home/rs/.aerc-tools/bash -e
set -e
exec -a "$0" ".html-wrapped" "$@"
```...and my `~/.config/aerc/filters/html-unsafe`:
```bash
#!/home/rs/.aerc-tools/bash
# aerc filter which runs w3m using socksify (from the dante package) to prevent
# any phoning home by rendered emails. If socksify is not installed then w3m is
# used without it.
if [ $(command -v socksify) ]; then
export SOCKS_SERVER="127.0.0.1:1"
PRE_CMD=socksify
else
PRE_CMD=""
fi
exec $PRE_CMD w3m \
-T text/html \
-cols $(tput cols) \
-dump \
-o display_image=false \
-o display_link_number=true
```Note the shebang line, and the use of w3m and socksify.