Service emacs (not yet working) + elogind sleep fix (couldn't test)
This commit is contained in:
parent
bd1f1ee81e
commit
b5f7a5be75
5 changed files with 104 additions and 5 deletions
55
guix-config/home/services/emacs.scm
Normal file
55
guix-config/home/services/emacs.scm
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
(define-module (guix-config home services emacs)
|
||||
#:use-module (gnu services configuration)
|
||||
#:use-module (gnu packages emacs)
|
||||
#:use-module (guix packages)
|
||||
#:use-module (guix gexp)
|
||||
#:use-module (gnu services)
|
||||
#:use-module (gnu home services)
|
||||
#:use-module (gnu packages emacs-xyz)
|
||||
#:use-module (ice-9 textual-ports) ;for get-string-all
|
||||
#:export (home-emacs-service-type
|
||||
home-emacs-configuration))
|
||||
|
||||
(define-configuration home-emacs-configuration
|
||||
(emacs
|
||||
(package emacs-pgtk)
|
||||
"The Emacs package to use.")
|
||||
(config-file
|
||||
(text-config '())
|
||||
"The config.el file.")
|
||||
(early-config-file
|
||||
(text-config '())
|
||||
"The early-config.el file.")
|
||||
; (emacs-packages
|
||||
; (list-of-packages)
|
||||
; "Emacs packages to install with emacs")
|
||||
)
|
||||
|
||||
(define package-user-dir "~/.cache/emacs/elpa")
|
||||
|
||||
(define (home-emacs-files-service config)
|
||||
(list `(".emacs.d/config.el"
|
||||
,(mixed-text-file "config.el"
|
||||
";; Emacs Config from Guix Home\n"
|
||||
(call-with-input-file (home-emacs-configuration-config-file config) get-string-all)))
|
||||
`(".emacs.d/early-config.el"
|
||||
,(mixed-text-file "early-config.el"
|
||||
";; Emacs Early Config from Guix Home\n"
|
||||
(string-append "(make-directory \"" package-user-dir "\" t)\n")
|
||||
(string-append "(setq package-user-dir \"" package-user-dir "\")\n")
|
||||
(home-emacs-configuration-early-config-file config)))))
|
||||
|
||||
(define (home-emacs-profile-service config)
|
||||
(list (home-emacs-configuration-emacs config)))
|
||||
|
||||
(define home-emacs-service-type
|
||||
(service-type (name 'home-emacs)
|
||||
(description "The home service to configure Emacs.")
|
||||
(extensions
|
||||
(list (service-extension
|
||||
home-files-service-type
|
||||
home-emacs-files-service)
|
||||
(service-extension
|
||||
home-profile-service-type
|
||||
home-emacs-profile-service)))
|
||||
(default-value (home-emacs-configuration))))
|
||||
|
|
@ -1,6 +1,7 @@
|
|||
(define-module (guix-config home workstation)
|
||||
#:use-module (gnu home)
|
||||
#:use-module (gnu packages emacs)
|
||||
#:use-module (gnu packages glib)
|
||||
#:use-module (gnu packages gnuzilla)
|
||||
#:use-module (gnu packages mail)
|
||||
#:use-module (gnu packages messaging)
|
||||
|
|
@ -20,12 +21,14 @@
|
|||
#:use-module (gnu packages xdisorg)
|
||||
#:use-module (gnu packages admin)
|
||||
#:use-module (gnu packages fonts)
|
||||
#:use-module (gnu packages games)
|
||||
#:use-module (gnu services)
|
||||
#:use-module (guix gexp)
|
||||
#:use-module (gnu home services shells)
|
||||
#:use-module (gnu home services dotfiles)
|
||||
#:use-module (gnu home services sound)
|
||||
#:use-module (gnu home services desktop)
|
||||
#:use-module (guix-config home services emacs)
|
||||
#:use-module (gnu home services niri))
|
||||
|
||||
(home-environment
|
||||
|
|
@ -40,6 +43,8 @@
|
|||
librewolf
|
||||
icecat
|
||||
nheko
|
||||
supertux
|
||||
supertuxkart
|
||||
;birdtray
|
||||
nextcloud-client
|
||||
nautilus
|
||||
|
|
@ -50,7 +55,7 @@
|
|||
wl-clipboard
|
||||
brightnessctl
|
||||
qtmultimedia
|
||||
accountsservice
|
||||
`(,glib "bin")
|
||||
matugen
|
||||
wayland
|
||||
xwayland-satellite
|
||||
|
|
@ -74,5 +79,16 @@
|
|||
("guix-full-upgrade" . "guix-pull && reconfigure")))))
|
||||
(service home-dotfiles-service-type
|
||||
(home-dotfiles-configuration
|
||||
(directories '("../../files")))))
|
||||
(directories '("../../files"))))
|
||||
; (service home-emacs-service-type
|
||||
; (home-emacs-configuration
|
||||
; (emacs emacs-pgtk)
|
||||
; (config-file
|
||||
; "../../../.emacs.d/config.el")
|
||||
; (early-config-file
|
||||
; "../../../.emacs.d/init.el")
|
||||
; (emacs-packages (list
|
||||
; emacs-guix))
|
||||
;))
|
||||
)
|
||||
%base-home-services)))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue