summaryrefslogtreecommitdiff
path: root/gnu/home/services.scm
AgeCommit message (Collapse)Author
2026-03-07home: services: Fix location of home-gc-root-service-type.Giacomo Leidi
The home-gc-root-service-type has gnu/services.scm as location but, being in gnu/home/services.scm, it should have gnu/home/services.scm. The tests/home-services.scm test has been broken since f7b8fbb504094ad617c7102579559efcc56db5fb . This commit fixes that, by instantiating a new service-type record instead of directly using the one built by system->home-service. This was initially reported by Yelninei at https://codeberg.org/guix/guix/issues/6946#issuecomment-11318779 . * gnu/home/services/scm (home-gc-root-service-type): Instantiate a new service-type record, instead of directly using the one built by system->home-service. Fixes: https://codeberg.org/guix/guix/issues/6960 Change-Id: I4389e6bbd2b2e4b0657768228651e8b1c01fee3a
2026-02-21home: services: Add home-gc-root-service-type.Giacomo Leidi
* gnu/home/services.scm (home-gc-root-service-type): New variable. Merges: https://codeberg.org/guix/guix/pulls/4236 Change-Id: I648068fc005a993b9527ed13ae87470c5ce9b693
2025-10-23home: services: bash: Support setting shell variables.Ludovic Courtès
* gnu/home/services.scm (shell-variable-definitions): New procedure. * gnu/home/services/shells.scm (serialize-shell-variables): New procedure. (home-bash-configuration)[variables]: New field. (add-bash-configuration): Honor it. (home-bash-extension)[variables]: New field. (home-bash-extensions): Handle ‘variables’. * doc/guix.texi (Shells Home Services): Update. Change ‘PS1’ example to use ‘variables’, not ‘environment-variables’. * doc/he-config-bare-bones.scm: Use ‘variables’ instead of ‘bash-profile’. Change-Id: I29083d6313d10b1eb9d91eccacfb33efefe60d58
2025-05-21home: services: Build "files" union allowing dangling symlinks.Sergey Trofimov
* gnu/home/services.scm (files->files-directory): Build file union without checking for existence of included items. * tests/guix-home.sh: Verify symlinking files out of store works. Change-Id: I94054003f4a6be944252ce7a397cf56f0b979554 Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2025-04-08home: services: Re-export ‘simple-service‘.Luis Guilherme Coelho
* gnu/home/services.scm: Re-export ‘simple-service‘. Change-Id: Id680af7050fa23d112e4172d96c15470c3dbeaf9 Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-02-21home: services: setup-environment: Set GUIX_LOCPATH.Liam Hupfer
Locales installed via Guix Home should be exposed to Guix packages by default. * gnu/home/services.scm (environment-variables->setup-environment-script): Set GUIX_LOCPATH. Change-Id: Ic61f0832312479ba36f471d92a12e7b4e296389f Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-02-21home: services: Unset variables after profile init.Liam Hupfer
While they aren’t exported, these temporary variables show up in the resulting shell, cluttering tab completion and declare -p. * gnu/home/services.scm (environment-variables->setup-environment-script): Unset shell variables. * gnu/home/services/shells.scm (add-shell-profile-file): Likewise. Change-Id: Ibb634849d9f38c1a9a44c0d493e92231364de958 Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-02-21home: services: setup-environment: Use GUIX_PROFILE.Liam Hupfer
setup-environment already defines this variable. Use it since it’s more concise. * gnu/home/services.scm (environment-variables->setup-environment-script): Use GUIX_PROFILE. Change-Id: Ib75d8df6294976f4e95cfa7d607dc0ba21ddd258 Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-02-19gnu: Fix some misspellings.Efraim Flashner
Change-Id: I316652aff7418af4b8e83bea24638b1513f8aa97
2024-09-29home: services: Add newline to XDG_RUNTIME_DIR warning.Richard Sent
* gnu/home/services.scm: Add end-of-text newline to warning printed by on-first-login script when XDG_RUNTIME_DIR does not exist. Change-Id: I3bfe2c415f6941fa9a2231ab2a0be53db965053f Signed-off-by: Hilton Chain <hako@ultrarare.space>
2024-01-28home: services: Add missing import.Ludovic Courtès
* gnu/home/services.scm: Import (srfi srfi-34) for ‘raise’. Change-Id: Ib0e8d134f3953c78a09b623f697e7e5b251d5611
2023-10-27home: services: Fix regression in generated ‘on-first-login’ script.Rostislav Svoboda
Fixes <https://issues.guix.gnu.org/66659>. Fixes a regression introduced in 6b0a32196982a0a2f4dbb59d35e55833a5545ac6. The first attempt in e098ba2f499bbddfea50c85058e4077e39b85513 to fix this issue didn't work. * gnu/home/services.scm (compute-on-first-login-script): Add ‘begin *unspecified*’ around #$@gexps. Change-Id: I14339ad684ffe93e692e507b57dcd221d96210ef Signed-off-by: Clément Lassieur <clement@lassieur.org>
2023-10-21home: services: Fix regression in generated ‘on-first-login’ script.Ludovic Courtès
Fixes <https://issues.guix.gnu.org/66659>. Fixes a regression introduced in 6b0a32196982a0a2f4dbb59d35e55833a5545ac6. * gnu/home/services.scm (compute-on-first-login-script): Add ‘begin’ around #$@gexps. Reported-by: Nils Landt <nils@landt.email>
2023-10-20home: services: Fix race condition when detecting first login.Carlo Zancanaro
* gnu/home/services.scm (compute-on-first-login-script): Use open-fdes to atomically check whether a file exists and create it if not. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2023-08-20home: services: Support mapping of System services to Home services.Ludovic Courtès
* 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-07-11home: services: bash: Properly quote shell aliases.Ludovic Courtès
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-01-09home: environment-variables: Fix escaping.Andrew Tropin
* 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-09home: environment-variables: Return support for file-likes and gexps.Andrew Tropin
* 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-05home: shells: Do not escape backslashes in single-quoted strings.Ludovic Courtès
This is a followup to 73684dc90e013f2f0cca1097b0c944bb9aa88709. * gnu/home/services.scm (environment-variable-shell-definitions) [shell-single-quote]: Remove #\\ from the escape list.
2023-01-05home: services: environment-variables: Add support for literal strings.Ludovic Courtès
* 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-03guix: Fix typos.jman
* 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>
2022-08-19home: Use absolute path for home in activation script.Andrew Tropin
* gnu/home/services.scm (compute-activation-script): Use absolute path for home in activation script.
2022-08-05home: Use warning instead of display.Andrew Tropin
* 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-02home: Add explicit dependency on env to activation script.Andrew Tropin
* gnu/home/services.scm (compute-activation-script): Add explicit dependency on env to activation script. Signed-off-by: 宋文武 <iyzsong@member.fsf.org>
2022-07-14home: services: environment-variables: Double-quote values.Ludovic Courtès
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-14home: services: Fix typo.Ludovic Courtès
* gnu/home/services.scm (environment-variables->setup-environment-script): Fix spelling of 'warn-about-duplicate-definitions'.
2022-06-04home: services: Add 'lookup-home-service-types' procedure.Ludovic Courtès
* gnu/home/services.scm (lookup-home-service-types): New procedure. * tests/home-services.scm: New file. * Makefile.am (SCM_TESTS): Add it.
2022-04-08home: Add home-xdg-data-files-service-type.Andrew Tropin
* 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-08home: symlink-manager: Remove appending of leading dot.Andrew Tropin
* 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-03-20home: Add home-xdg-configuration-files service.Andrew Tropin
* gnu/home/services.scm (home-xdg-configuration-files): New variable. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-03-20home: Explicitly connect home-file and symlink-manager services.Andrew Tropin
* 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-02-05home: services: import i18n module.Justin Martin
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-01-28home: 'reconfigure' checks for potential downgrades.Ludovic Courtès
* 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-03home: services: Make strings in Gexps translateble.Xinglu Chen
* 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>
2021-11-17gnu: home: services: Fix typo.Vagrant Cascadian
* gnu/home/services.scm (compute-on-first-login-script): Fix spelling of "appropriate".
2021-11-16home: services: Fix typo.Ludovic Courtès
Reinstates 4dcec60fa6a93dbc93bef2cdb91e3633c705579e, minus the regression it introduced. * gnu/home/services.scm (compute-on-first-login-script): Use 'program-file', not 'gexp->script'.
2021-11-16Revert "home-services: Demonadify 'on-first-login' handling."Efraim Flashner
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 4dcec60fa6a93dbc93bef2cdb91e3633c705579e.
2021-11-14home: services: Typo fix.Vagrant Cascadian
* gnu/home/services.scm: Fix spelling of "directory".
2021-11-14home-services: Demonadify 'on-first-login' handling.Ludovic Courtès
* 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-14home-services: on-first-login: Check if XDG_RUNTIME_DIR exists.Andrew Tropin
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-10-09scripts: home: Make sure profile directory exists.Oleg Pykhalov
* guix/scripts/home.scm (process-action): Make sure profile directory exists.
2021-10-09Move (gnu home-services) to (gnu home services).Oleg Pykhalov
* 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.