Ludovic Courtès
161d010d40
home: services: Support mapping of System services to Home services.
...
* gnu/home/services.scm (service-type-mapping)
(system->home-service-type): New procedures.
(define-service-type-mapping, define-service-type-mappings): New macros.
(%system/home-service-type-mapping): New variable.
<top level>: Use 'define-service-type-mappings'.
* gnu/home/services/shepherd.scm <top level>: Likewise.
2023-08-20 22:48:47 +02:00
Ludovic Courtès
7d9fdfb19d
home: services: bash: Properly quote shell aliases.
...
Fixes <https://issues.guix.gnu.org/63048 >.
Reported by Ekaitz Zarraga <ekaitz@elenq.tech>.
* gnu/home/services.scm (with-shell-quotation-bindings): New procedure.
(environment-variable-shell-definitions): Use it instead of inline copy.
* gnu/home/services/shells.scm (bash-serialize-aliases): Use it. Add
clause for 'literal-string?'.
* tests/guix-home.sh: Add 'aliases' to 'home-bash-extension' and test it.
2023-07-11 15:47:56 +02:00
Andrew Tropin
35ecbb418c
home: environment-variables: Fix escaping.
...
* gnu/home/services.scm (environment-variable-shell-definitions): Fix
escaping.
* tests/guix-home.sh: Add STRING_WITH_ESCAPES environment variable and test
its value.
Reported-by: elevnkb
2023-01-09 12:22:56 +04:00
Andrew Tropin
2acce55a00
home: environment-variables: Return support for file-likes and gexps.
...
* gnu/home/services.scm (environment-variable-shell-definitions): Add support
for file-likes and gexps.
* tests/guix-home.sh: Add SHELL environment variable and test its value. Add
BUILDHOSTTIME environment variable.
2023-01-09 12:03:32 +04:00
Ludovic Courtès
e7da6dd6d6
home: shells: Do not escape backslashes in single-quoted strings.
...
This is a followup to 73684dc90e
.
* gnu/home/services.scm (environment-variable-shell-definitions)
[shell-single-quote]: Remove #\\ from the escape list.
2023-01-05 15:36:29 +01:00
Ludovic Courtès
73684dc90e
home: services: environment-variables: Add support for literal strings.
...
* gnu/home/services.scm (<literal-string>): New record type.
(environment-variable-shell-definitions): Split 'shell-quote' into
'quote-string' and 'shell-double-quote'. Add 'shell-single-quote'.
Add clause for 'literal-string' records.
* tests/guix-home.sh: Test it.
* doc/guix.texi (Essential Home Services): Document it.
2023-01-05 14:20:23 +01:00
jman
4dab99ac9f
guix: Fix typos.
...
* gnu/home/services.scm (home-files-service-type): Fix typo.
(home-xdg-configuration-files-service-type): Likewise.
(home-xdg-data-files-service-type): Likewise.
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2023-01-03 16:29:02 -05:00
Andrew Tropin
ffc391500a
home: Use absolute path for home in activation script.
...
* gnu/home/services.scm (compute-activation-script): Use absolute path for
home in activation script.
2022-08-19 18:55:40 +03:00
Andrew Tropin
3b1510b8b9
home: Use warning instead of display.
...
* gnu/home/services/xdg.scm (compute-on-first-login-script): Use warning
instead of display.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-08-05 15:28:03 +02:00
Andrew Tropin
9355d46329
home: Add explicit dependency on env to activation script.
...
* gnu/home/services.scm (compute-activation-script): Add explicit dependency
on env to activation script.
Signed-off-by: 宋文武 <iyzsong@member.fsf.org>
2022-08-02 16:53:29 +08:00
Ludovic Courtès
af4c103595
home: services: environment-variables: Double-quote values.
...
Fixes <https://issues.guix.gnu.org/54469 >.
Reported by Maxime Devos <maximedevos@telenet.be>.
* gnu/home/services.scm (environment-variable-shell-definitions): New
procedure, with code formerly in 'serialize-posix-env-vars'.
(environment-variables->setup-environment-script): Change
"setup-environment" from 'mixed-text-file' to 'computed-file', and use
'environment-variable-shell-definitions'.
* tests/guix-home.sh: Test it.
* gnu/home/services/shells.scm (serialize-posix-env-vars): Delegate to
'environment-variable-shell-definitions'.
2022-07-14 01:05:34 +02:00
Ludovic Courtès
7a6302acb0
home: services: Fix typo.
...
* gnu/home/services.scm (environment-variables->setup-environment-script):
Fix spelling of 'warn-about-duplicate-definitions'.
2022-07-14 01:05:34 +02:00
Ludovic Courtès
8eb17cebc1
home: services: Add 'lookup-home-service-types' procedure.
...
* gnu/home/services.scm (lookup-home-service-types): New procedure.
* tests/home-services.scm: New file.
* Makefile.am (SCM_TESTS): Add it.
2022-06-04 12:04:24 +02:00
Andrew Tropin
20645d8467
home: Add home-xdg-data-files-service-type.
...
* gnu/home/services.scm (home-xdg-data-files-service-type): New variable.
* gnu/home/services/symlink-manager.scm (update-symlinks-script): Add a proper
handling for XDG_DATA_HOME value.
* gnu/home/services/xdg.scm (home-xdg-mime-applications-service-type): Use
home-xdg-data-files service.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-04-08 20:13:48 +02:00
Andrew Tropin
5832d9fb60
home: symlink-manager: Remove appending of leading dot.
...
* gnu/home/services.scm (xdg-configuration-files-directory): Add leading dot.
* gnu/home/services.scm (xdg-configuration-files-service-type): Change name.
* gnu/home/services/shells.scm (add-shell-profile-file,
zsh-get-configuration-files, add-zsh-dot-configuration,
add-zsh-xdg-configuration, add-bash-configuration): Add leading dots.
* gnu/home/services/symlink-manager.scm (update-symlinks-script): Remove
leading dot.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-04-08 20:13:45 +02:00
Andrew Tropin
e0089dc0e9
home: Add home-xdg-configuration-files service.
...
* gnu/home/services.scm (home-xdg-configuration-files): New variable.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-03-20 19:02:41 +01:00
Andrew Tropin
d3ef61ab17
home: Explicitly connect home-file and symlink-manager services.
...
* gnu/home/services.scm (home-files-directory): New variable.
* gnu/home/symlink-manager.scm (update-symlinks-script): Use
home-files-directory variable from (gnu home services).
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-03-20 19:02:41 +01:00
Justin Martin
41efa45508
home: services: import i18n module.
...
Fixes <https://issues.guix.gnu.org/53701 >.
Reported by Roland Everaert <r.everaert@protonmail.com>
and Holger Peters <holger.peters@posteo.de>.
* gnu/home/services.scm (%initialize-gettext): remove setlocale for guile scripts.
(compute-on-first-login-script): add module import for i18n.
(compute-on-change-gexp): add module import for i18n.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-02-05 00:59:30 +01:00
Ludovic Courtès
23ccfd3840
home: 'reconfigure' checks for potential downgrades.
...
* guix/scripts/home.scm (show-help, %options): Add "--allow-downgrades".
(%default-options): Remove 'build-mode'; add 'validate-reconfigure'.
(perform-action): Add #:validate-reconfigure. Call
'check-forward-update' when ACTION is 'reconfigure.
(process-action): Pass #:validate-reconfigure to 'perform-action'.
* gnu/home/services.scm (home-provenance): Export.
* doc/guix.texi (Invoking guix home): Document '--allow-downgrades'.
2022-01-28 23:14:44 +01:00
Xinglu Chen
cde3376b35
home: services: Make strings in Gexps translateble.
...
* gnu/home/services.scm (%initialize-gettext): New variable.
(compute-on-first-login-script): Use it.
(compute-on-change-gexp): Likewise.
* gnu/home/services/symlink-manager.scm (update-symlinks-script): Likewise.
* po/guix/POTFILES.in: Add gnu/home-services.scm and
gnu/home/services/symlink-manager.scm.
Suggested-by: Ludovic Courtès <ludo@gnu.org>
Link: <https://yhetil.org/guix-bugs/87sfvy8k1u.fsf@gnu.org >
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-01-03 19:32:07 +01:00
Vagrant Cascadian
b066c9b03d
gnu: home: services: Fix typo.
...
* gnu/home/services.scm (compute-on-first-login-script): Fix spelling of
"appropriate".
2021-11-17 12:55:24 -08:00
Ludovic Courtès
e5d8302b2c
home: services: Fix typo.
...
Reinstates 4dcec60fa6
, minus the
regression it introduced.
* gnu/home/services.scm (compute-on-first-login-script): Use
'program-file', not 'gexp->script'.
2021-11-16 14:37:34 +01:00
Efraim Flashner
b2f8186590
Revert "home-services: Demonadify 'on-first-login' handling."
...
This commit breaks building guix home
guix home: error: reference to invalid output 'out' of derivation \
'/gnu/store/86zc4rijsswmfqnaq8rwixcxjl2zyl1c-on-first-login.drv'
This reverts commit 4dcec60fa6
.
2021-11-16 15:31:07 +02:00
Vagrant Cascadian
40a18f4934
home: services: Typo fix.
...
* gnu/home/services.scm: Fix spelling of "directory".
2021-11-14 17:32:51 -08:00
Ludovic Courtès
4dcec60fa6
home-services: Demonadify 'on-first-login' handling.
...
* gnu/home/services.scm (compute-on-first-login-script): Use
'computed-file' instead of' gexp->script'.
(on-first-login-script-entry): Expect a regular value rather than a
monadic value and remove 'mlet'.
2021-11-14 23:18:08 +01:00
Andrew Tropin
5c2f30d3de
home-services: on-first-login: Check if XDG_RUNTIME_DIR exists.
...
Fixes <https://issues.guix.gnu.org/50945 >.
Reported by Jan Nieuwenhuizen <janneke@gnu.org>.
* gnu/home-services.scm (on-first-login): on-first-login won't execute
anything if XDG_RUNTIME_DIR doesn't exists.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2021-11-14 23:18:08 +01:00
Oleg Pykhalov
0f6a27c2c4
scripts: home: Make sure profile directory exists.
...
* guix/scripts/home.scm (process-action): Make sure profile directory exists.
2021-10-09 19:24:19 +03:00
Oleg Pykhalov
0e8d2df0f1
Move (gnu home-services) to (gnu home services).
...
* gnu/home-services.scm (%guix-home-root-directory): Replace
gnu/home-services.scm with "gnu/home/services.scm".
Rename to gnu/home/services.scm.
* gnu/local.mk
(GNU_SYSTEM_MODULES): Rename gnu/home-services.scm to gnu/home/services.scm.
* doc/he-config-bare-bones.scm:
Replace (gnu home-services) with (gnu home services).
* gnu/home.scm: Same.
* gnu/home/services/fontutils.scm: Same.
* gnu/home/services/mcron.scm: Same.
* gnu/home/services/shells.scm: Same.
* gnu/home/services/shepherd.scm: Same.
* gnu/home/services/symlink-manager.scm: Same.
* gnu/home/services/xdg.scm: Same.
* guix/scripts/home.scm: Same.
* guix/self.scm: Same.
2021-10-09 19:24:18 +03:00