temp changes
This commit is contained in:
parent
c45e1fcd8b
commit
c8a2ce5015
|
@ -18,6 +18,7 @@
|
||||||
(gnu home services)
|
(gnu home services)
|
||||||
(ryan-services pipewire)
|
(ryan-services pipewire)
|
||||||
(ryan-services spotify)
|
(ryan-services spotify)
|
||||||
|
(ryan-config utils)
|
||||||
(ryan-packages freedesktop)
|
(ryan-packages freedesktop)
|
||||||
(ryan-packages mozilla))
|
(ryan-packages mozilla))
|
||||||
|
|
||||||
|
@ -132,7 +133,6 @@
|
||||||
("sway" ,(local-file "sway" #:recursive? #t))
|
("sway" ,(local-file "sway" #:recursive? #t))
|
||||||
("hypr" ,(local-file "hypr" #:recursive? #t))
|
("hypr" ,(local-file "hypr" #:recursive? #t))
|
||||||
("foot" ,(local-file "foot" #:recursive? #t))
|
("foot" ,(local-file "foot" #:recursive? #t))
|
||||||
("spotify-player" ,(local-file "spotify-player" #:recursive? #t))
|
|
||||||
("pulse/client.conf" ,(local-file "pulseaudio/client.conf"))
|
("pulse/client.conf" ,(local-file "pulseaudio/client.conf"))
|
||||||
("waybar" ,(local-file "waybar" #:recursive? #t))
|
("waybar" ,(local-file "waybar" #:recursive? #t))
|
||||||
("alacritty" ,(local-file "alacritty" #:recursive? #t))
|
("alacritty" ,(local-file "alacritty" #:recursive? #t))
|
||||||
|
@ -149,6 +149,10 @@
|
||||||
(service home-pipewire-service-type)
|
(service home-pipewire-service-type)
|
||||||
(service home-spotifyd-service-type)
|
(service home-spotifyd-service-type)
|
||||||
(service home-dbus-service-type)
|
(service home-dbus-service-type)
|
||||||
|
;;; trying some changes
|
||||||
|
(template-files "."
|
||||||
|
'("spotify-player/app.toml"
|
||||||
|
;;;
|
||||||
(service home-gpg-agent-service-type
|
(service home-gpg-agent-service-type
|
||||||
(home-gpg-agent-configuration
|
(home-gpg-agent-configuration
|
||||||
(pinentry-program
|
(pinentry-program
|
||||||
|
|
33
modules/ryan-config/utils.scm
Normal file
33
modules/ryan-config/utils.scm
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
(define-module (ryan-config utils)
|
||||||
|
#:use-module (gnu packages)
|
||||||
|
#:use-module (gnu services)
|
||||||
|
#:use-module (gnu home services)
|
||||||
|
#:use-module (gnu home services shepherd)
|
||||||
|
#:use-module (gnu packages freedesktop)
|
||||||
|
#:use-module (gnu services configuration)
|
||||||
|
#:use-module (guix gexp)
|
||||||
|
#:use-module (ice-9 regex)
|
||||||
|
#:use-module (ice-9 pretty-print)
|
||||||
|
#:use-module (ice-9 textual-ports)
|
||||||
|
|
||||||
|
#:export (gather-manifest-packages
|
||||||
|
apply-template-file))
|
||||||
|
|
||||||
|
(define (apply-template template-string value-alist)
|
||||||
|
(regexp-substitute/global #f
|
||||||
|
"\\$\\{([A-Za-z/\\-]+)\\}"
|
||||||
|
template-string
|
||||||
|
'pre
|
||||||
|
(lambda (m)
|
||||||
|
(let ((entry (assq (string->symbol (match:substring m 1))
|
||||||
|
value-alist)))
|
||||||
|
(if entry
|
||||||
|
(cdr entry)
|
||||||
|
"VALUE NOT FOUND")))
|
||||||
|
'post))
|
||||||
|
|
||||||
|
(define (apply-template-file file-path value-alist)
|
||||||
|
(call-with-input-file file-path
|
||||||
|
(lambda (port)
|
||||||
|
(apply-template (get-string-all port)
|
||||||
|
value-alist))))
|
Loading…
Reference in a new issue