utils: Add json-file.

* modules/rosenthal/utils/file.scm (json-file): New procedure.
* modules/rosenthal/services/desktop.scm (%rosenthal-skeletons-installer)
[.cache/noctalia/shell-state.json]: Use it.
This commit is contained in:
Hilton Chain committed 2026-02-25 16:18:45 +08:00
1 parent c2630512c6
commit f8fb2556c3
2 files changed
+19 -14

No files matched your search

+6 -14
View File
@@ -597,20 +597,12 @@ gtk-key-theme-name = ~a~%"
,(local-file "../examples/dot-config/wezterm/wezterm.lua"))
;; Prevent Noctalia shell initial screen.
(".cache/noctalia/shell-state.json"
,(computed-file "noctalia-shell-state.json"
(with-extensions (list guile-json-4)
#~(begin
(use-modules (json))
(call-with-output-file #$output
(lambda (port)
(scm->json
`(("changelogState"
("lastSeenVersion"
. ,(string-append "v" #$(package-version noctalia-shell))))
("telemetry"
("instanceId" . "")))
port
#:pretty #t)))))))
,(json-file "noctalia-shell-state.json"
#~'(("changelogState"
("lastSeenVersion"
. #$(string-append "v" (package-version noctalia-shell))))
("telemetry"
("instanceId" . "")))))
,@%rosenthal-skeletons))