Next: , Previous: , Up: Top   [Contents]


3 Configuration

Shroud, the CLI application which is not included in this package, but can be installed seperately has some defaults where it looks for the configuration files and secrets-file. It’s configuration can be changed in the ‘$HOME/.shroud’ file. The default secrets file is stored in ‘$HOME/.config/shroud/db.gpg’.

You can edit ‘$HOME/.shroud’ to modify Shroud’s behaviour.

Emacs-shroud can be configured to use the same defaults as Shroud CLI implementation.

(require 'shroud)
(setq shroud-el--database-file "~/.config/shroud/db.gpg")
(setq shroud-el--config-file "~/.shroud")
(setq shroud-el--gpg-key "user@example.com")

If no usable GnuPG key is set neither one is found in the configuration file, Shroud may prompt you to choose a key each time you edit the secrets file.

To initialize Shroud, add this to your configuration file.

(shroud--init)

If no executable is found for Shroud CLI then the program will setup automatically to use Elisp implementation only. You can choose to use the Elisp implementation exclusively with this in your Emacs configuration.

(setq shroud-executable nil)
(shroud--init)

Or you can use the Emacs’s Customise feature:

M-x customize-group shroud

3.1 Sample Shroud Config

By default it’s stored in ‘~/.shroud

The config expects an alist that at the very least contains a symbol ‘user-id’ associated to a valid GnuPG key.

'((user-id . "user@example.com"))

3.2 Sample Shroud Secrets File

By default it’s stored in ‘~/.config/shroud/db.gpg

Though you can add as many fields as you’d like to the ‘contents’ section, please be wary to use ‘password’ and ‘username’ fields, spelled exactly so. You can always add extra fields for example ’notes’, or ’comments’ but the included Interfaces only support a few given fields ’url’, ’username’, and ’password’.

;; -*- epa-file-encrypt-to: ("user@example.com") -*-
(((id . "user01")
      (contents  ("password" . "hackme") ("username" . "please")))
 ((id . "user02")
      (contents  ("password" . "1337") ("username" . "l33t") ("url" . "abc.xyz")))

Next: , Previous: , Up: Top   [Contents]