guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#58652] Creating home-emacs-service-type


From: Zain Jabbar
Subject: [bug#58652] Creating home-emacs-service-type
Date: Wed, 19 Oct 2022 15:59:12 -1000

Aloha Guix Development Team,

First submission of a patch to this mail service. Hopefully this
works. I welcome any and all feedback.

Attached is a patch which creates a new file
=/gnu/home/services/emacs.scm= which defines a new service
=home-emacs-service-type= and a configuration for said service
=home-emacs-configuration=. The configuration contains a list of
packages to add to the home-profile, and a list of expressions to add
into Emacs' =init.el= and =early-init.el=.

Here is an example of a home environment file which:

Adds the following packages:
- =bash=
- =emacs-next=
- =emacs-debbugs=
- =emacs-evil=
- =emacs-paredit=
- =emacs-anzu=

Overwrites the =.config/emacs/init.el= with:
#+BEGIN_SRC emacs-lisp
(evil-mode 1)
#+END_SRC

Overwrites the =.config/emacs/early-init.el= with:
#+BEGIN_SRC emacs-lisp
(setq warning-suppress-log-types '((comp) (comp))) (setq
warning-suppress-types '((comp) (comp)))
#+END_SRC

#+BEGIN_SRC scheme
(use-modules (gnu home services emacs)
     (gnu home)
     (gnu packages)
     (ice-9 pretty-print)
     (gnu services))

(define-public minimal-home-environment
  (home-environment
   (services
    (list
     (service home-emacs-service-type
      (home-emacs-configuration
       (packages
(list
(specification->package "bash")
(specification->package "emacs-next")
(specification->package "emacs-debbugs")
(specification->package "emacs-evil")
(specification->package "emacs-paredit")
(specification->package "emacs-anzu")))
       (init '((evil-mode 1)))
       (early-init '((setq warning-suppress-log-types '((comp) (comp)))
     (setq warning-suppress-types '((comp) (comp)))))))))))

minimal-home-environment
#+END_SRC

Saving this text into a file =minimal-working-example.scm= allows us
to run this configuration with =guix home -N --share=/tmp container
./minimal-working-example.scm=.

-- 
Mahalo,
Zain Jabbar

Attachment: home-emacs-service-type.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]