From c8728574db0208f47ca95ddda6a341d9174c4e4d Mon Sep 17 00:00:00 2001 From: Andrew Tropin Date: Fri, 16 Apr 2021 09:57:22 +0300 Subject: [PATCH] gnu: home-services: xdg: Add LOG_HOME and STATE_HOME extensions --- gnu/home-services/xdg.scm | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/gnu/home-services/xdg.scm b/gnu/home-services/xdg.scm index 055ef094..8d1ebb12 100644 --- a/gnu/home-services/xdg.scm +++ b/gnu/home-services/xdg.scm @@ -64,11 +64,23 @@ this directory should contain static configurations.") (data-home (path "$HOME/.local/share") "Base directory for programs to store architecture independent -read-only shared data, analog of @file{/usr/share}, but for user.") +read-only shared data, analogus to @file{/usr/share}, but for user.") (runtime-dir (path "${XDG_RUNTIME_DIR:-/run/user/$UID}") "Base directory for programs to store user-specific runtime files, -like sockets.")) +like sockets.") + (log-home + (path "$HOME/.local/var/log") + "Base directory for programs to store log files, analogus to +@file{/var/log}, but for user. It is not a part of XDG Base Directory +Specification, but helps to make implementation of home services more +consistent.") + (state-home + (path "$HOME/.local/var/lib") + "Base directory for programs to store state files, like databases, +analogus to @file{/var/lib}, but for user. It is not a part of XDG +Base Directory Specification, but helps to make implementation of home +services more consistent.")) (define (home-xdg-base-directories-environment-vars-service config) (map @@ -86,7 +98,11 @@ like sockets.")) home-environment-vars-service-type home-xdg-base-directories-environment-vars-service))) (default-value (home-xdg-base-directories-configuration)) - (description "Configure XDG base directories."))) + (description "Configure XDG base directories. This +service introduces two additional variables @env{XDG_STATE_HOME}, +@env{XDG_LOG_HOME}. They are not a part of XDG specification, at +least yet, but are convinient to have, it improves a consistency +between different home services."))) (define (generate-home-xdg-base-directories-documentation) (generate-documentation -- 2.45.2