Compare commits

...

4 Commits

Author SHA1 Message Date
Hilton Chain
7f429bcc77
services: Fix %rosenthal-example-emacs-init.
This is a follow-up to 0bf12445b0.

* modules/rosenthal/services/desktop.scm (%rosenthal-example-emacs-init):
Pass a list to ‘computed-substitution-with-inputs’.
2025-06-25 03:00:51 +08:00
Hilton Chain
0bf12445b0
services: Remove %rosenthal-example-emacs-fonts.
* modules/rosenthal/services/desktop.scm (%rosenthal-example-emacs-init): Use
‘computed-substitution-with-inputs’.
(%rosenthal-example-emacs-fonts): Delete variable.
* modules/rosenthal/examples/emacs/init.el: Adjust Emacs configuration.
2025-06-25 02:10:09 +08:00
Hilton Chain
1ab9fdea6d
services: Add some shell utilities.
* modules/rosenthal/services/shellutils.scm (home-atuin-service-type)
(home-direnv-service-type, home-zoxide-service-type): New variables.
(<home-atuin-configuration>, <home-direnv-configuration>)
(<home-zoxide-configuration>): New data types.
* .dir-locals.el (scheme-mode): Add indentations for their constructors.
2025-06-25 00:20:03 +08:00
Hilton Chain
9655f0b6f7
examples: mako.conf: Adjust border.
* modules/rosenthal/examples/mako.conf: Adjust border color.
Set border size.
Re-order configurations.
2025-06-24 18:30:02 +08:00
5 changed files with 150 additions and 20 deletions

View File

@ -52,7 +52,9 @@
(eval . (put 'cuirass-worker-container-configuration 'scheme-indent-function 0))
(eval . (put 'docker-mailserver-configuration 'scheme-indent-function 0))
(eval . (put 'forgejo-configuration 'scheme-indent-function 0))
(eval . (put 'home-atuin-configuration 'scheme-indent-function 0))
(eval . (put 'home-blueman-applet-configuration 'scheme-indent-function 0))
(eval . (put 'home-direnv-configuration 'scheme-indent-function 0))
(eval . (put 'home-fcitx5-configuration 'scheme-indent-function 0))
(eval . (put 'home-mako-configuration 'scheme-indent-function 0))
(eval . (put 'home-network-manager-applet-configuration 'scheme-indent-function 0))
@ -64,6 +66,7 @@
(eval . (put 'home-theme-configuration 'scheme-indent-function 0))
(eval . (put 'home-wakapi-configuration 'scheme-indent-function 0))
(eval . (put 'home-waybar-configuration 'scheme-indent-function 0))
(eval . (put 'home-zoxide-configuration 'scheme-indent-function 0))
(eval . (put 'iwd-configuration 'scheme-indent-function 0))
(eval . (put 'jellyfin-configuration 'scheme-indent-function 0))
(eval . (put 'komga-configuration 'scheme-indent-function 0))

View File

@ -5,18 +5,14 @@
;; TODO:
;; 1. Configure geiser. Take a look at guile-studio.
;; 2. Make use of guix: comments.
;;;
;;; Init
;;;
;; 2. Make use of `guix:' comments.
(setopt custom-file (locate-user-emacs-file "custom.el"))
(if (not (file-exists-p custom-file))
(make-empty-file custom-file)
(load custom-file))
(load-file (locate-user-emacs-file "fonts.el"))
(load-file (locate-user-emacs-file "$$fonts.el$$"))
;; Tweak garbage collection strategy.
;;guix:emacs-gcmh
@ -32,8 +28,10 @@
(use-package emacs
:custom
(shell-file-name "/bin/sh") ;Workaround to use fish as login shell.
(word-wrap-by-category t)) ;CJK support.
;; Workaround to use fish as login shell.
(shell-file-name "/bin/sh")
;; CJK support.
(word-wrap-by-category t))
;;;
@ -167,7 +165,7 @@
;; Disable tab indentation.
(indent-tabs-mode nil)
:config
;; Avoid re-indenting current line after entering RET.
;; Avoid re-indenting current line after entering `RET'.
(setopt electric-indent-inhibit t)
:hook
(before-save . delete-trailing-whitespace)
@ -217,7 +215,9 @@
;;guix:emacs-magit
(use-package magit
:custom
(git-commit-cd-to-toplevel t)
(git-commit-cd-to-toplevel t))
(use-package project
:config
(add-to-list 'project-switch-commands '(magit-project-status "Magit") t)
:bind

View File

@ -2,8 +2,9 @@
#
# SPDX-License-Identifier: CC0-1.0
background-color=#D2DEE9E0
border-color=#D2DEE9
text-color=#13181B
border-radius=5
font=monospace 11
text-color=#13181B
background-color=#D2DEE9E0
border-size=1
border-color=#B3C6D3
border-radius=5

View File

@ -27,8 +27,7 @@
#:use-module (rosenthal packages xorg)
#:export (%rosenthal-example-emacs-fonts
%rosenthal-example-emacs-init
#:export (%rosenthal-example-emacs-init
home-blueman-applet-configuration
home-blueman-applet-service-type
@ -65,11 +64,10 @@
;;; Configuration file presets.
;;;
(define %rosenthal-example-emacs-fonts
(local-file "../examples/emacs/fonts.el"))
(define %rosenthal-example-emacs-init
(local-file "../examples/emacs/init.el"))
(computed-substitution-with-inputs "init.el"
(local-file "../examples/emacs/init.el")
(list (local-file "../examples/emacs" #:recursive? #t))))
;;;

View File

@ -0,0 +1,128 @@
;;; SPDX-FileCopyrightText: 2025 Hilton Chain <hako@ultrarare.space>
;;;
;;; SPDX-License-Identifier: GPL-3.0-or-later
(define-module (rosenthal services shellutils)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-26)
#:use-module (guix gexp)
#:use-module (guix records)
#:use-module (gnu services)
#:use-module (gnu services configuration)
#:use-module (gnu home services shells)
#:use-module (rosenthal packages rust-apps)
#:export (home-atuin-configuration
home-atuin-service-type
home-direnv-configuration
home-direnv-service-type
home-zoxide-configuration
home-zoxide-service-type))
(define (shells? val)
(every (cut member <> '(bash zsh fish))
val))
;;;
;;; atuin
;;;
(define-configuration/no-serialization home-atuin-configuration
(atuin
(file-like atuin)
"")
(shells
shells
""))
(define %home-atuin-fish
(match-record-lambda <home-atuin-configuration>
(atuin shells)
(if (member 'fish shells)
(home-fish-extension
(config
(list (mixed-text-file "atuin.fish"
atuin "/bin/atuin init fish | source\n")))))))
(define home-atuin-service-type
(service-type
(name 'atuin)
(extensions
`(,@(if %home-atuin-fish
(list (service-extension home-fish-service-type
%home-atuin-fish))
'())))
(description "")))
;;;
;;; direnv
;;;
(define-configuration/no-serialization home-direnv-configuration
(direnv
(file-like (spec->pkg "direnv"))
"")
(shells
shells
""))
(define %home-direnv-fish
(match-record-lambda <home-direnv-configuration>
(direnv shells)
(if (member 'fish shells)
(home-fish-extension
(config
(list (mixed-text-file "direnv.fish"
direnv "/bin/direnv hook fish | source\n")))))))
(define home-direnv-service-type
(service-type
(name 'direnv)
(extensions
`(,@(if %home-direnv-fish
(list (service-extension home-fish-service-type
%home-direnv-fish))
'())))
(description "")))
;;;
;;; zoxide
;;;
(define-configuration/no-serialization home-zoxide-configuration
(zoxide
(file-like (spec->pkg "zoxide"))
"")
(shells
shells
""))
(define %home-zoxide-fish
(match-record-lambda <home-zoxide-configuration>
(zoxide shells)
(if (member 'fish shells)
(home-fish-extension
(config
(list (mixed-text-file "zoxide.fish"
zoxide "/bin/zoxide init --cmd cd fish | source\n")))))))
(define home-zoxide-service-type
(service-type
(name 'zoxide)
(extensions
`(,@(if %home-zoxide-fish
(list (service-extension home-fish-service-type
%home-zoxide-fish))
'())))
(description "")))