Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/t4ccer/elrage

Emacs interface to rage
https://github.com/t4ccer/elrage

age agenix emacs rage

Last synced: 26 days ago
JSON representation

Emacs interface to rage

Awesome Lists containing this project

README

        

* =elrage=

*Experimental* Emacs interface to Rust implementation of =age= ([[https://github.com/str4d/rage][rage]]) with support for passphrase input callbacks. It requires Emacs compiled with support for [[https://www.gnu.org/software/emacs/manual/html_node/elisp/Dynamic-Modules.html][dynamic modules]].

** Installation

*** With Nix

#+begin_src console
$ mkdir -p ~/.emacs.d/dynamic-modules # or any path other you want
$ nix build -L github:t4ccer/elrage#elrage
$ nix-store --realise ./result --add-root ~/.emacs.d/dynamic-modules/elrage.root
$ ln -s ~/.emacs.d/dynamic-modules/{elrage.root/lib/,}elrage.so -f
#+end_src

*** With Cargo

#+begin_src console
$ git clone https://github.com/t4ccer/elrage
$ cd elrage
$ mkdir -p ~/.emacs.d/dynamic-modules # or any path other you want
$ cargo build --release
$ cp ./target/release/libelrage.so ~/.emacs.d/dynamic-modules/elrage.so
#+end_src

Note that this is not recommended on NixOS for long-term use (but perfect for development) as runtime dependencies of elrage.so file such as glibc may get garbage collected.

*** Common

#+begin_src elisp
(add-to-list 'load-path "~/.emacs.d/dynamic-modules")
(require 'elrage)
#+end_src

** Usage

*** [[https://github.com/t4ccer/agenix.el/][agenix.el]] integration

Functions exposed by this package have signatures that match those of =agenix-age-decrypt-function= and =agenix-age-encrypt-function= variables. This enables support for SSH keys with passphrases and does not require =age= executable in runtime.

#+begin_src elisp
;; Install agenix.el and elrage

(setq agenix-age-decrypt-function 'elrage-decrypt-file-interactive)
(setq agenix-age-encrypt-function 'elrage-encrypt-file)
#+end_src

** License

Copyright (C) 2024 Tomasz Maciosowski (t4ccer)

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.