home: xdg-base-directories: Set correct value for XDG_STATE_HOME.

XDG Base Directory Specification 0.8 officially introduces the
XDG_STATE_HOME environment variable.

Fixes <https://issues.guix.gnu.org/issue/61809>.

* gnu/home/services/xdg.scm
(home-xdg-base-directories-configuration)[state-home]: Set default value
according to spec.  Update field documentation.
(home-xdg-base-directories-service-type): Update service description.

Signed-off-by: Andrew Tropin <andrew@trop.in>
This commit is contained in:
Bruno Victal 2023-03-05 15:19:13 +00:00 committed by Andrew Tropin
parent b46d9f2470
commit 5c893787be
No known key found for this signature in database
GPG key ID: 2208D20958C1DEB0

View file

@ -104,11 +104,11 @@ (define-configuration home-xdg-base-directories-configuration
Specification, but helps to make implementation of home services more Specification, but helps to make implementation of home services more
consistent.") consistent.")
(state-home (state-home
(path "$HOME/.local/var/lib") (path "$HOME/.local/state")
"Base directory for programs to store state files, like databases, "Base directory for programs to store state data that should persist
analogus to @file{/var/lib}, but for user. It is not a part of XDG between (application) restarts, such as logs, but are not important or
Base Directory Specification, but helps to make implementation of home portable enough to the user to warrant storing them in
services more consistent.")) @env{XDG_DATA_HOME}."))
(define (home-xdg-base-directories-environment-variables-service config) (define (home-xdg-base-directories-environment-variables-service config)
(map (map
@ -158,12 +158,12 @@ (define home-xdg-base-directories-service-type
(compose identity) (compose identity)
(extend last-extension-or-cfg) (extend last-extension-or-cfg)
(description "Configure XDG base directories. This (description "Configure XDG base directories. This
service introduces two additional variables @env{XDG_STATE_HOME}, service introduces an additional @env{XDG_LOG_HOME} variable. It's not
@env{XDG_LOG_HOME}. They are not a part of XDG specification, at a part of XDG specification, at least yet, but are convenient to have,
least yet, but are convenient to have, it improves the consistency it improves the consistency between different home services. The
between different home services. The services of this service-type is services of this service-type is instantiated by default, to provide
instantiated by default, to provide non-default value, extend the non-default value, extend the service-type (using @code{simple-service}
service-type (using @code{simple-service} for example)."))) for example).")))
(define (generate-home-xdg-base-directories-documentation) (define (generate-home-xdg-base-directories-documentation)
(generate-documentation (generate-documentation