Commit graph

88 commits

Author SHA1 Message Date
Ludovic Courtès
6420015e6d
home: Add gpg-agent service.
* gnu/home/services/gnupg.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
* doc/guix.texi (GNU Privacy Guard): New node.
(Secure Shell): Link to it.
2023-04-08 22:56:19 +02:00
Bruno Victal
5c893787be
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>
2023-04-07 09:07:32 +04:00
Bruno Victal
0fbb356714
services: replace bare serializers with (serializer ...)
* gnu/home/services/shells.scm
(home-zsh-configuration)[environment-variables]: Use (serializer ...).
(home-bash-configuration)[aliases, environment-variables]: Likewise.
(home-fish-configuration)[abbreviations, aliases]
[environment-variables]: Likewise.
* gnu/services/audio.scm (mpd-configuration)[music-dir, playlist-dir]
[endpoints, address, inputs, archive-plugins, input-cache-size]
[decoders, filters, playlist-plugins]: Likewise.
* gnu/services/linux.scm (fstrim-configuration)[extra-arguments]:
Likewise.
* gnu/services/security.scm (fail2ban-jail-configuration)[backend]
[log-encoding, extra-content]: Likewise.
* tests/services/configuration.scm: Update tests.
("serialize-configuration [deprecated]"): New test.

Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
2023-04-02 12:35:30 +02:00
Jan (janneke) Nieuwenhuizen
8304634260
home: services: Export home-xmodmap-service-type and configuration.
This is a follow-up to commit
    511ae8325d
    home: services: Add home-xmodmap-service-type.

* gnu/home/services/desktop.scm (home-xmodmap-service-type,
home-xmodmap-configuration): Export.
2023-03-26 19:57:07 +02:00
conses
511ae8325d
home: services: Add home-xmodmap-service-type.
* gnu/home/services/desktop.scm (home-xmodmap-service-type)
(home-xmodmap-configuration): New variables;
(serialize-xmodmap-configuration)
(xmodmap-shepherd-service): New procedures;
* doc/guix.texi (Desktop Services): Document it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-03-17 23:20:36 +01:00
Jan (janneke) Nieuwenhuizen
2714c9ef2d
home: services: ssh-agent: Handle setting of SSH_AUTH_SOCK.
* gnu/home/services/ssh.scm (home-ssh-agent-environment-variables): New
procedure.
(home-ssh-agent-service-type): Use it as ahome-environment-service type
extension.
* doc/guix.texi (Secure Shell): Remove advice about, and examples of setting
SSH_AUTH_SOCK.
2023-03-17 12:44:33 +01:00
Ludovic Courtès
8f219e658d
home: services: kodi, znc, ssh-agent: Use 'match-record'.
* gnu/home/services/media.scm (home-kodi-services): Use 'match-record'
instead of 'match'.
* gnu/home/services/messaging.scm (home-znc-services): Likewise.
* gnu/home/services/ssh.scm (home-ssh-agent-services): Likewise.
2023-03-16 23:03:17 +01:00
Ludovic Courtès
c68648a8a5
home: services: znc: Remove host-side use of (shepherd support).
This is a followup to 193f547ca3, which
inadvertently pulled in (shepherd support) on the host side.

* gnu/home/services/messaging.scm (home-znc-services): Change 'command' and
'log-file' to gexps.  Add 'modules' field to 'shepherd-service'.
2023-03-16 17:29:03 +01:00
Ludovic Courtès
6afd1fd6bc
home: services: kodi: Remove host-side use of (shepherd support).
This is a followup to 70056b1b2b, which
inadvertently pulled in (shepherd support) on the host side.

* gnu/home/services/media.scm (home-kodi-services): Change 'command' and
'logfile' to gexps.  Add 'modules' field to 'shepherd-service'.
2023-03-16 17:23:51 +01:00
Ludovic Courtès
be7e2bf7eb
home: services: ssh-agent: Remove host-side use of (shepherd support).
This is a followup to 2c2f382e75, which
inadvertently pulled in (shepherd support) on the host side.

* gnu/home/services/ssh.scm (<home-ssh-agent-configuration>)[socket-directory]:
Change value to a gexp.
(home-ssh-agent-services): Change 'socket-file' and 'command' to a
gexp.  Add 'modules' field to 'shepherd-service'.
* doc/guix.texi (Secure Shell): Adjust accordingly.
2023-03-16 17:09:46 +01:00
Jan (janneke) Nieuwenhuizen
70056b1b2b
gnu: home: services: Add home-kodi-service-type.
* gnu/home/services/media.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
* po/guix/POTFILES.in: Likewise.
* doc/guix.texi (Media Home Services): Document it in new subsection.
2023-03-16 14:33:16 +01:00
Jan (janneke) Nieuwenhuizen
193f547ca3
gnu: home: services: Add home-znc-service-type.
* gnu/home/services/messaging.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
* po/guix/POTFILES.in: Likewise.
* doc/guix.texi (Messaging Home Services): Document it in new subsection.
2023-03-16 14:32:50 +01:00
Jan (janneke) Nieuwenhuizen
2c2f382e75
gnu: home: services: Add home-ssh-agent-service-type.
* gnu/home/services/ssh.scm: (<home-ssh-agent-configuration>): New type.
(home-ssh-agent-services): New procedure.
(home-ssh-agent-service-type): New variable.
* doc/guix.texi (Secure Shell): Document it.
2023-03-16 14:26:34 +01:00
conses
837e179e00
home: services: Add home-unclutter-service-type.
* gnu/home/services/desktop.scm (home-unclutter-configuration)
(home-unclutter-service-type): New variables;
(home-unclutter-shepherd-service): New procedure;
* doc/guix.texi (Desktop Services): Document it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-03-16 12:37:03 +01:00
Ludovic Courtès
674d893316
home: services: Add 'pulseaudio-rtp-sink' and 'pulseaudio-rtp-source'.
* gnu/home/services/sound.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
* doc/guix.texi (Sound Home Services): New section.
2023-03-05 23:06:55 +01:00
Giacomo Leidi
f85865a05a
home: services: fontutils: Add service value.
* gnu/home/services/fontutils.scm (add-fontconfig-config-file): Add
support for multiple paths;
(home-fontconfig-service-type): Honor it;
* doc/guix.texi (Fonts Services): Document it.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2023-01-31 23:08:38 +01:00
Ludovic Courtès
086df6ef21
system: Define default 'PS1' in /etc/bashrc rather than ~/.bashrc.
Users can override 'PS1' in ~/.bashrc if they wish.

Previously, on Guix Home, the "default" 'PS1' would be set in ~/.bashrc
when 'home-bash-configuration-guix-defaults?' is true, preventing users
from overriding it via the 'environment-variables' field of
'home-bash-extension'.

* gnu/system/shadow.scm (%default-bashrc): Remove 'PS1' setting.
* gnu/system.scm (operating-system-etc-service): Define PS1 in
/etc/bashrc.
* gnu/home/services/shells.scm (add-bash-configuration): When
'home-bash-configuration-guix-defaults?' is true, add a default 'PS1' to
~/.bash_profile.
2023-01-05 15:00:27 +01:00
Ludovic Courtès
2127e56bd8
system, home: Factorize default '.bashrc'.
* gnu/system/shadow.scm (%default-bashrc): New variable.  Source
/etc/bashrc only if it exists.
(default-skeletons): Use it.
* gnu/home/services/shells.scm (guix-bashrc): Remove.
(add-bash-configuration): Refer to '%default-bashrc' instead.
2023-01-05 14:21:19 +01:00
Andrew Tropin
dd4eee5581
home: xdg: Add with-imported-modules to xdg activation script.
Without it activation doesn't work when called in clean environment.

* gnu/home/services/xdg.scm (ensure-xdg-base-dirs-on-activation): Add
with-imported-modules to xdg activation script.
2022-12-23 11:43:27 +04:00
Andrew Tropin
77ef82ce93
home: xdg: Make it possible to extend user-directories service.
* gnu/home/services/xdg.scm (home-xdg-user-directories-service-type): Make it
possible to override user-directories configuration by extending.
2022-12-19 15:11:40 +04:00
Ludovic Courtès
4c8eea027a
home: services: Use 'match-record' instead of 'match'.
* gnu/home/services/mcron.scm (home-mcron-shepherd-services): Use
'match-record' instead of 'match'.
* gnu/home/services/shells.scm (home-bash-extensions): Likewise.
* gnu/home/services/xdg.scm (serialize-xdg-desktop-entry): Likewise.
2022-12-02 00:02:13 +01:00
Andrew Tropin
7dddf0cc54
home: xdg: Export xdg-base/user-directories getters.
* gnu/home/services/xdg.scm: Export xdg-base/user-directories getters.
2022-12-01 18:56:23 +04:00
Ludovic Courtès
8b56983999
home: services: redshift: Add 'configuration' action.
* gnu/home/services/shepherd.scm: Re-export
'shepherd-configuration-action'.
* gnu/home/services/desktop.scm (redshift-shepherd-service): Add
'actions' field.
2022-11-18 15:44:40 +01:00
Maxim Cournoyer
238248aac9
Fix problems initially introduced in commit 543d971ed2, now reinstated.
Commit 543d971ed2 ("services: configuration: Re-order generated record
fields") introduced two regressions, one in guix home and another one in the
zabbix service.

* gnu/home/services/shells.scm (home-bash-extensions): Remove the first
pattern in the match, which used to be to ignore %location.
* gnu/services/monitoring.scm (zabbix-front-end-nginx-extension): Likewise.
2022-11-17 06:49:51 -05:00
Maxim Cournoyer
44554e7133
Revert "services: configuration: Revert to a working ‘guix home’."
This reverts commit 39e4e00f75, with fixes for
the guix home issues reported and another one found while reconfiguring berlin
in the subsequent commit.
2022-11-17 06:49:51 -05:00
Tobias Geerinckx-Rice
39e4e00f75
services: configuration: Revert to a working ‘guix home’.
This reverts commit 543d971ed2, and
its dependent commit 9b21cd2e9a, which
appear to have triggered a recent wave of ‘guix home’ regressions
involving (services (list (service home-bash-service-type))):

In gnu/home/services/shells.scm:
    504:7  3 (home-bash-extensions #<<home-bash-configuration> package: #<package bash@5.1.8 gnu/packages/ba…> …)
In unknown file:
           2 (append #<<location> file: "…" line: 14 column: 12> ())
In ice-9/boot-9.scm:
  1685:16  1 (raise-exception _ #:continuable? _)
  1685:16  0 (raise-exception _ #:continuable? _)

ice-9/boot-9.scm:1685:16: In procedure raise-exception:
In procedure append: Wrong type argument in position 1 (expecting empty list): #<<location> file: "…" line: 14 column: 12>

I should love to dive in & fix this rather than revert, but urgently
need sleep.
2022-11-13 01:00:00 +01:00
Maxim Cournoyer
9b21cd2e9a
services: mcron: Add log? and log-format fields to mcron-configuration.
* gnu/services/mcron.scm (list-of-gexps?): New predicate.
(mcron-configuration): Rewrite using define-configuration.
[log?, log-format]: New fields.
(mcron-shepherd-services): Invoke mcron with the --log and --log-format
arguments when log? is #t,
(generate-doc): New procedure.
* doc/guix.texi (Scheduled Job Execution): Update doc.
(Mcron Home Service): Likewise.
* gnu/home/services/mcron.scm: Keep in sync with the above changes to
gnu/services/mcron.scm.
2022-11-15 16:26:16 -05:00
Andrew Tropin
3ab14386cd
home: dbus: Inherit environment variables from shepherd.
* gnu/home/services/desktop.scm (home-dbus-shepherd-services)[start]
  <#:environment-variables>: Inherit environment variables from shepherd.
2022-10-17 15:49:27 +04:00
Andrew Tropin
6fad3d5985
home: dbus: Remove unecessary list call.
* gnu/home/services/desktop.scm (home-dbus-shepherd-services)[start]
  <#:environment-variables>: Remove unecessary list call.
2022-10-17 15:18:55 +04:00
(
27c4f396b7
home: home-dbus-service-type: Fix make-forkexec-constructor call.
* gnu/home/services/desktop.scm (home-dbus-shepherd-services)[start]
  <#:environment-variables>: Use a quote instead of a gexp.

Signed-off-by: Andrew Tropin <andrew@trop.in>
2022-10-14 11:06:07 +04:00
( via Guix-patches via
4ab434958b
gnu: home: Add home-dbus-service-type.
* gnu/home/services/desktop.scm (home-dbus-service-type): New variable.
(home-dbus-configuration): New record type.
* doc/guix.texi: Document them.

Signed-off-by: Andrew Tropin <andrew@trop.in>
2022-10-13 09:05:46 +04:00
( via Guix-patches via
7030f592c6
home: Add home-batsignal-service-type.
* gnu/home/services/pm.scm (home-batsignal-service-type): New variable.
(home-batsignal-configuration): New record type.
* doc/guix.texi: Document them.
* gnu/local.mk: Add gnu/home/services/pm.scm.
2022-10-04 17:04:45 +04:00
Andrew Tropin
6cdde65bb5
home: shepherd: Add daemonize? option to configuration.
* gnu/home/services/shepherd.scm (home-shepherd-configuration):
Add DAEMONIZE?.
(home-shepherd-configuration-file): Use CONFIG argument instead of two
separate SERVICES and SHEPHERD, respect DAEMONIZE?.
(ensure-shepherd-gexp, launch-shepherd-gexp,
shepherd-xdg-configuration-files): Adjust according to arguments changes in
HOME-SHEPHERD-CONFIGURATION-FILE.
2022-09-14 18:25:11 +03:00
Andrew Tropin
70d58d1556
home: shepherd: Add shepherd/init.scm to XDG_CONFIG_HOME.
* gnu/home/services/shepherd.scm (shepherd-xdg-configuration-files):
New variable.
(home-shepherd-service-type)[extensions]:
Add HOME-XDG-CONFIGURATION-FILES-SERVICE-TYPE extension.
2022-09-12 08:43:08 +03:00
Attila Lendvai
ee08277a70
services: Use the new maybe/unset API.
* gnu/home/services/ssh.scm (serialize-address-family): Use the public API of
the maybe infrastructure.
* gnu/services/file-sharing.scm (serialize-maybe-string): Use maybe-value.
(serialize-maybe-file-object): Use maybe-value-set?.
* gnu/services/getmail.scm (getmail-retriever-configuration): Don't use
internals in unset field declarations.
(getmail-destination-configuration): Ditto.
* gnu/services/messaging.scm (raw-content?): Use maybe-value-set?.
(prosody-configuration): Use %unset-value.
* gnu/services/telephony.scm (jami-shepherd-services): Use maybe-value-set?.
(archive-name->username): Use maybe-value-set?.
* tests/services/configuration.scm ("maybe type, no default"): Use
%unset-value.

Modified-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2022-08-25 00:10:32 -04:00
Maxim Cournoyer
d9a0ccf13f
home: ssh: Fix invalid value error for address-family.
Fixes <https://issues.guix.gnu.org/57110>, a regression introduced with
a2b89a3319.

* gnu/home/services/ssh.scm (address-family?): Replace *unspecified* with 'unset.
(serialize-address-family): Adjust accordingly.
(openssh-host): Adjust doc.

Reported-by: Oleg Pykhalov <go.wigust@gmail.com>
2022-08-10 09:10:45 -04:00
Andrew Tropin
b57c656f72
home: xdg: Skip mkdir XDG_RUNTIME_DIR in activation script.
* gnu/home/services/xdg.scm (ensure-xdg-base-dirs-on-activation): Skip mkdir
XDG_RUNTIME_DIR in activation script.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-08-05 15:28:02 +02:00
Andrew Tropin
a80edc0d82
home: xdg: Use a single @ instead of @@.
* gnu/home/services/xdg.scm (ensure-xdg-base-dirs-on-activation,
home-xdg-user-directories-files-service): Use single @ intsead of @@.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-08-05 15:28:02 +02: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
8af749224f
home: services: shells: Double-quote environment variable values.
Fixes <https://issues.guix.gnu.org/56540>.

Until now, environment variable values were emitted unquoted, producing
invalid shell code if the value contains spaces for example.

* gnu/home/services/shells.scm (serialize-posix-env-vars): Define
'shell-quote' procedure in staged code and use it for #$value.
* tests/guix-home.sh: Add test for PS1 variable with a value containing
spaces.
2022-07-14 01:05:34 +02:00
Ludovic Courtès
9e4cbb3076
home: services: shell: Do not use "setup" as a verb.
* gnu/home/services/shells.scm (zsh-file-zprofile)
(add-bash-configuration): Do not use "setup" as a word in generated
files.  End sentences with a period.
2022-07-14 01:05:34 +02:00
Reily Siegel
8d922504b2
gnu: home: Add Guix channels service.
* gnu/home/services/guix.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add guix.scm.
* doc/guix.texi: Add documentation for home-channels-service.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-07-12 01:17:46 +02:00
(
75a520cca6
home: services: shells: Export Fish environment variables.
Variables set in the Fish configuration weren't previously being
exported.

* gnu/home/services/shells.scm (serialize-fish-env-vars): Output the
`set -x` command instead of `set`.

Signed-off-by: Tobias Geerinckx-Rice <me@tobias.gr>
2022-06-29 20:40:36 +02:00
Ludovic Courtès
7f208f68de
home: Add OpenSSH service.
* gnu/home/services/ssh.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
* po/guix/POTFILES.in: Add it.
* doc/guix.texi (Secure Shell): New section.
2022-06-17 23:39:32 +02:00
Attila Lendvai
8cb1a49a39
services: configuration: Use *unspecified* instead of 'disabled.
Use *unspecified* as a marker for field values that have not been set.

Rationale: 'disabled may easily clash with user values for boolean fields, is
confusing (i.e. its meaning is *not* boolean false, but unspecified) and it
also passes silently through the symbol? predicate of a field of type symbol.

* gnu/services/configuration.scm (configuration-missing-default-value):
Renamed from configuration-no-default-value.
(define-maybe-helper): Use *unspecified* instead of 'disabled, and make
the default value optional.
* gnu/home/services/desktop.scm (home-redshift-configuration):
Change (maybe-xyz 'disabled) to maybe-xyz.
* gnu/services/authentication.scm (nslcd-configuration): Likewise.
* gnu/services/cgit.scm (repository-cgit-configuration): Likewise.
* gnu/services/file-sharing.scm (serialize-maybe-string)
(serialize-maybe-file-object): Use 'unspecified?' instead of (eq? val
'disabled).
* gnu/services/messaging.scm (raw-content?): Likewise.
(ssl-configuration): Change (maybe-xyz 'disabled) to maybe-xyz.
(prosody-configuration): Likewise.
* gnu/services/file-sharing.scm (transmission-daemon-configuration):
Likewise.
* gnu/services/messaging.scm (define-all-configurations):
Use *unspecified* instead of 'disabled'.
* gnu/services/networking.scm (opendht-configuration): Likewise.
* gnu/services/pm.scm (tlp-configuration): Likewise.
* gnu/services/telephony.scm (jami-account): Likewise.
(jami-configuration): Likewise.
* gnu/services/vpn.scm (openvpn-client-configuration): Likewise.
* tests/services/configuration.scm ("maybe type, no default")
("maybe type, with default"): New tests.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-06-15 00:25:21 +02:00
Bastien Rivière
2c408520f5
home: shells: Migrate fish to xdg-configuration-files.
* gnu/home/services/shells.scm (home-fish-service-type): Use new
xdg-configuration-files-service-type service.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-04-29 18:07:16 +02:00
Maya
f2eb0d3922
home: services: fish: Fix incorrect ".config" file name.
This is a followup to 5832d9fb60.

* gnu/home/services/shells.scm (fish-files-service): Change "config/"
to ".config/".

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-04-29 00:33:45 +02:00
Ludovic Courtès
dd2ab92d9d
home: shepherd: Redirect input port to /dev/null.
Suggested by Aleksandr Vityazev <avityazev@posteo.org>.

* gnu/home/services/shepherd.scm (home-shepherd-configuration-file):
Redirect input port to /dev/null.
2022-04-21 00:02:21 +02:00
Ludovic Courtès
bc867b2ab0
home: shepherd: "shepherd.conf" returns one value.
Fixes <https://issues.guix.gnu.org/54779>.
Reported by Aleksandr Vityazev <avityazev@posteo.org>
and Nicolas Graves <ngraves@ngraves.fr>.

* gnu/home/services/shepherd.scm (home-shepherd-configuration-file):
Return one value.
2022-04-21 00:00:14 +02:00
Andrew Tropin
8805c7eab1
home: shepherd: Prevent launching the second instance.
Fixes <https://issues.guix.gnu.org/54545>.

* gnu/home/services/shepherd.scm (launch-shepherd-gexp): Launch shepherd
if and only if its socket file does not already exist.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-04-12 23:30:09 +02:00