app/irc: update README & clarify gnutls dependency

This commit is contained in:
Henrik Lissner 2019-12-27 00:17:18 -05:00
parent ac336a55ea
commit 995617edf1
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -7,8 +7,11 @@
- [[#description][Description]] - [[#description][Description]]
- [[#module-flags][Module Flags]] - [[#module-flags][Module Flags]]
- [[#plugins][Plugins]] - [[#plugins][Plugins]]
- [[#dependencies][Dependencies]]
- [[#prerequisites][Prerequisites]] - [[#prerequisites][Prerequisites]]
- [[#macos][macOS]]
- [[#debian--ubuntu][Debian / Ubuntu]]
- [[#arch-linux][Arch Linux]]
- [[#nixos][NixOS]]
- [[#features][Features]] - [[#features][Features]]
- [[#an-irc-client-in-emacs][An IRC Client in Emacs]] - [[#an-irc-client-in-emacs][An IRC Client in Emacs]]
- [[#configuration][Configuration]] - [[#configuration][Configuration]]
@ -17,7 +20,7 @@
- [[#troubleshooting][Troubleshooting]] - [[#troubleshooting][Troubleshooting]]
* Description * Description
This module turns adds an IRC client to Emacs with OS notifications. This module turns Emacs into an IRC client, capable of OS notifications.
** Module Flags ** Module Flags
This module provides no flags. This module provides no flags.
@ -26,11 +29,27 @@ This module provides no flags.
+ [[https://github.com/jorgenschaefer/circe][circe]] + [[https://github.com/jorgenschaefer/circe][circe]]
+ [[https://github.com/eqyiel/circe-notifications][circe-notifications]] + [[https://github.com/eqyiel/circe-notifications][circe-notifications]]
* Dependencies
This module requires =gnutls-cli= or =openssl= for secure connections.
* Prerequisites * Prerequisites
This module has no direct prerequisites. This module requires =gnutls= for secure IRC connections to work.
** macOS
#+BEGIN_SRC sh
brew install gnutls
#+END_SRC
** Debian / Ubuntu
#+BEGIN_SRC sh
apt install gnutls-bin
#+END_SRC
** Arch Linux
#+BEGIN_SRC sh
pacman -S gnutls
#+END_SRC
** NixOS
#+BEGIN_SRC nix
environment.systemPackages = [ pkgs.gnutls ];
#+END_SRC
* Features * Features
** An IRC Client in Emacs ** An IRC Client in Emacs
@ -54,20 +73,23 @@ When in a circe buffer these keybindings will be available.
| ~circe-reconnect~ | =SPC m R= | Reconnect the current server | | ~circe-reconnect~ | =SPC m R= | Reconnect the current server |
* Configuration * Configuration
Use ~set-irc-server!~ to configure IRC servers. Its second argument (a plist) Use ~set-irc-server! SERVER PLIST~ to configure IRC servers. Its second argument (a plist)
takes the same arguments as ~circe-network-options~. takes the same arguments as ~circe-network-options~.
#+BEGIN_SRC emacs-lisp :tangle no #+BEGIN_SRC emacs-lisp :tangle no
(set-irc-server! "chat.freenode.net" ;; if you omit =:host=, ~SERVER~ will be used instead.
`(:tls t (after! circe
:nick "doom" (set-irc-server! "chat.freenode.net"
:sasl-username "myusername" `(:tls t
:sasl-password "mypassword" :port 6697
:channels ("#emacs"))) :nick "doom"
:sasl-username "myusername"
:sasl-password "mypassword"
:channels ("#emacs"))))
#+END_SRC #+END_SRC
*It is a obviously a bad idea to store auth-details in plaintext,* so here are However, *it is a obviously a bad idea to store your password in plaintext,* so
some ways to avoid that: here are ways to avoid that:
** Pass: the unix password manager ** Pass: the unix password manager
[[https://www.passwordstore.org/][Pass]] is my tool of choice. I use it to manage my passwords. If you activate the [[https://www.passwordstore.org/][Pass]] is my tool of choice. I use it to manage my passwords. If you activate the
@ -80,6 +102,7 @@ password store.
#+BEGIN_SRC emacs-lisp :tangle no #+BEGIN_SRC emacs-lisp :tangle no
(set-irc-server! "chat.freenode.net" (set-irc-server! "chat.freenode.net"
`(:tls t `(:tls t
:port 6697
:nick "doom" :nick "doom"
:sasl-username ,(+pass-get-user "irc/freenode.net") :sasl-username ,(+pass-get-user "irc/freenode.net")
:sasl-password ,(+pass-get-secret "irc/freenode.net") :sasl-password ,(+pass-get-secret "irc/freenode.net")
@ -105,10 +128,10 @@ Note that =+pass-get-user= tries to find your username by looking for the fields
listed in =+pass-user-fields= (by default =login=, =user==, =username== and listed in =+pass-user-fields= (by default =login=, =user==, =username== and
=email=)=). An example configuration looks like =email=)=). An example configuration looks like
#+BEGIN_SRC txt :tangle no #+begin_example
mysecretpassword mysecretpassword
username: myusername username: myusername
#+END_SRC #+end_example
** Emacs' auth-source API ** Emacs' auth-source API
~auth-source~ is built into Emacs. As suggested [[https://github.com/jorgenschaefer/circe/wiki/Configuration#safer-password-management][in the circe wiki]], you can store ~auth-source~ is built into Emacs. As suggested [[https://github.com/jorgenschaefer/circe/wiki/Configuration#safer-password-management][in the circe wiki]], you can store