Commit graph

1071 commits

Author SHA1 Message Date
Pierre Langlois
42fbe62d52
linux-container: Remove hosts-service-type when network is shared.
Fixes <https://issues.guix.gnu.org/61627>.

* gnu/system/linux-container.scm (container-essential-services): When
shared-network? is true, remove the hosts-service-type service kind.
2023-03-26 14:15:16 +01:00
Efraim Flashner
723fc5df3e
system: Update skeleton gdbinit.
* gnu/system/shadow.scm (default-skeleton): Update gdbinit to search for
more debug packages in guix-home and the system profile.
(skeleton-directory): Move .gdbinit to .config/gdb/gdbinit.
2023-03-07 16:35:20 +02:00
Bruno Victal
2397f47680
file-systems: Remove deprecated 'title' field helper procedures.
* gnu/system/file-systems.scm (<file-system>): Change constructor name to 'file-system'.
(report-deprecation, device-expression, process-file-system-declaration, file-system): Remove macros.
(file-system-title): Remove procedure.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-03-05 23:06:55 +01:00
Bruno Victal
2799ad4423
services: dbus: Deprecate 'dbus-service' procedure.
* doc/guix.texi (Desktop Services): Replace with 'dbus-root-service-type'.
Document dbus-configuration.
* gnu/services/dbus.scm (dbus-service): Define with 'define-deprecated'.
* gnu/services/desktop.scm (desktop-services-for-system): Replace with
dbus-root-service-type.
* gnu/system/install.scm (%installation-services): Ditto.
* gnu/tests/base.scm (%avahi-os): Ditto.
* gnu/tests/docker.scm (%docker-os): Ditto.
* gnu/tests/lightdm.scm (minimal-desktop-services): Ditto.
* gnu/tests/virtualization.scm (%libvirt-os): Ditto.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-03-03 17:55:35 +01:00
Bruno Victal
2e7516168e
services: base: Deprecate 'udev-service' procedure.
* doc/guix.texi (Base Services): Replace udev-service with udev-service-type.
Document <udev-configuration>. Use @defun @-commands for udev-rules-service,
udev-rule and file->udev-rule.
* gnu/services/base.scm (udev-service): Deprecate procedure.
* gnu/system/install.scm (%installation-services): Use udev-service-type.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-03-03 17:55:32 +01:00
Bruno Victal
6edacf2491
services: base: Deprecate 'syslog-service' procedure.
* doc/guix.texi (Base Services): Replace syslog-service with syslog-service-type.
* gnu/services/base.scm (%default-syslog.conf): Place before <syslog-configuration>.
(syslog-service-type): Set default value.
(syslog-service): Deprecate procedure.
(%base-services): Use syslog-service-type.
* gnu/system/hurd.scm (%base-services/hurd): Ditto.
* gnu/system/install.scm (%installation-services): Ditto.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-03-03 17:55:32 +01:00
Bruno Victal
98e9dc6ab7
services: base: Deprecate 'nscd-service' procedure.
* doc/guix.texi (Application Setup): Compress @cindex entries.
(Base Services): Compress @cindex entries. Delete %nscd-default-configuration.
Replace 'nscd-service' with 'nscd-service-type'.
* gnu/services/base.scm (%nscd-default-configuration): Deprecate variable.
(nscd-service): Deprecate procedure.
* gnu/system/install.scm (%installation-services): Use nscd-service-type.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-03-03 17:55:32 +01:00
Bruno Victal
4892c0186e
services: base: Deprecate 'agetty-service' procedure.
* doc/guix.texi (Base Services): Replace agetty-service with
agetty-service-type.
* gnu/services/base.scm (agetty-service): Deprecate procedure.
* gnu/system/examples/beaglebone-black.tmpl
(operating-system)[services]: Use agetty-service-type.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-03-03 17:55:32 +01:00
Bruno Victal
ad665a38fc
services: base: Deprecate 'mingetty-service' procedure.
* doc/guix.texi (Base Services): Replace mingetty-service with
mingetty-service-type.
* gnu/services/base.scm (mingetty-service): Deprecate procedure.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-03-03 17:55:32 +01:00
Bruno Victal
6dd635b4cf
services: base: Deprecate 'login-service' procedure.
* doc/guix.texi (Base Services): Replace with login-service-type.
* gnu/services/base.scm (login-service): Deprecate procedure.
* gnu/system/install.scm (%installation-services): Use login-service-type.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-03-03 17:55:32 +01:00
Tobias Geerinckx-Rice
4ef9a5dd5e
file-systems: Validate 'no-diratime flag.
This follows up on commit c077345539, and
adds a comment to avoid this in future.

* gnu/system/file-systems.scm (invalid-file-system-flags):
Add 'no-diratime to the list of KNOWN-FLAGS.
2023-02-26 01:00:07 +01:00
Andrew Tropin
a4dfbead19
system: Source .profile in skeleton bash_profile.
Make it consistent with bash_profile generated by Guix Home.

* gnu/system/shadow.scm (default-skeletons)[bash_profile]: Source .profile in
skeleton bash_profile.
2023-02-08 18:13:08 +04: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
Maxim Cournoyer
60d4652c5d
image: Enhance compatibility of the root ext4 partition.
Generating a raw-with-offset image would previously not be bootable with
U-Boot.

* gnu/system/image.scm (root-partition) [file-system-options]: New field.
2022-12-26 22:47:02 -05:00
dan
c50cd1bbec
images: wsl2: Create XDG_RUNTIME_DIR on first login.
* gnu/system/images/wsl2.scm (wsl-boot-program): Create XDG_RUNTIME_DIR on
first login and set it.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
2022-12-26 09:34:26 +01:00
Ludovic Courtès
12ca767702
Merge branch 'version-1.4.0' 2022-12-19 00:40:33 +01:00
Ludovic Courtès
b1aef25453
install: Make sure uvesafb can be loaded.
Fixes <https://issues.guix.gnu.org/60010>.
Reported by pelzflorian (Florian Pelz) <pelzflorian@pelzflorian.de>.

Previously, the 'modprobe' executable would try and fail to load the
module from /lib/modules/*.  Set 'LINUX_MODULE_DIRECTORY' to make sure
'modprobe' looks for the module in the right place.

* gnu/system/install.scm (uvesafb-shepherd-service)[modprobe]: New
variable.
In 'start' method, invoke it instead of KMOD/bin/modprobe.
2022-12-15 23:54:10 +01:00
Maxim Cournoyer
491bddfa27
system: examples: Add mode prop line.
* gnu/system/examples/asus-c201.tmpl: Add a mode prop line.
* gnu/system/examples/bare-bones.tmpl: Likewise.
* gnu/system/examples/beaglebone-black.tmpl: Likewise.
* gnu/system/examples/desktop.tmpl: Likewise.
* gnu/system/examples/docker-image.tmpl: Likewise.
* gnu/system/examples/lightweight-desktop.tmpl: Likewise.
* gnu/system/examples/raspberry-pi-64-nfs-root.tmpl: Likewise.
* gnu/system/examples/raspberry-pi-64.tmpl: Likewise.
* gnu/system/examples/vm-image.tmpl: Likewise.
2022-12-16 23:42:17 -05:00
Tobias Geerinckx-Rice
90a2b8c64a
install: Add lvm2-static system package.
* gnu/system/install.scm (%installer-disk-utilities): Add lvm2-static.
2022-12-11 01:00:15 +01:00
Ludovic Courtès
302a84a593
Merge branch 'version-1.4.0' 2022-12-12 15:03:35 +01:00
Ludovic Courtès
755c4b496e
system: Remove unused yggdrasil OS template.
This file was added in fe1cd098d2 but it's
not referenced from anywhere, not even gnu/local.mk.  Furthermore, we
don't normally add full OS examples for the purposes of illustrating the
use of a single service.

* gnu/system/examples/yggdrasil.tmpl: Remove.
2022-12-09 16:40:53 +01:00
Ludovic Courtès
9ad14196ce
image: Clarify comment.
* gnu/system/image.scm: Adjust comment.
2022-12-06 15:11:44 +01:00
Ludovic Courtès
f59aa79ca3
system: vm: Non-volatile 'run-vm.sh' creates a CoW image.
Previously, copying the image would consume a lot of space and was
I/O-intensive, to the point that the marionette connection timeout of
20s could be reached when running tests like "docker-system".

* gnu/system/vm.scm (common-qemu-options): Pass 'format=' for each
'-drive' option.
(system-qemu-image/shared-store-script)[copy-image]: New variable.
[builder]: Use it when VOLATILE? is false.
2022-12-06 15:06:35 +01:00
Maxim Cournoyer
ba4aed0f1f
install: Add missing e2fsprogs utility.
* gnu/system/install.scm (%installer-disk-utilities): Add e2fsprogs.

Reported-by: Adam Kandur <kefironpremise@gmail.com>
2022-12-06 10:24:55 +01:00
Maxim Cournoyer
aeecd06ab9
system: Rename and move %base-packages-disk-utilities.
Rationale: It is only used in INSTALLATION-OS and doesn't make sense to be
used in another context, given that file systems now automatically pull their
dependencies since commit 45eac6cdf5 (services:
Add file system utilities to profile).

* gnu/system.scm (%base-packages-disk-utilities): Deprecate and rename to...
* gnu/system/install.scm (%installer-disk-utilities): ... this.
(installation-os) [packages]: Adjust accordingly.
2022-12-06 10:24:39 +01:00
Gabriel Wicki
ec9326f021
system: images: Add networking support to pine64 image.
* gnu/system/images/pine64.scm (pine64-barebones-os) [services]: Add
dhcp-client-service-type and ntp-service-type to the list of services.
[packages]: Add nss-certs to the list of packages.

Signed-off-by: 宋文武 <iyzsong@member.fsf.org>
2022-12-09 11:02:15 +08:00
Maxim Cournoyer
ed845e8250
install: Add missing e2fsprogs utility.
* gnu/system/install.scm (%installer-disk-utilities): Add e2fsprogs.

Reported-by: Adam Kandur <kefironpremise@gmail.com>
2022-12-05 11:21:15 -05:00
Maxim Cournoyer
1603c78aa4
system: Rename and move %base-packages-disk-utilities.
Rationale: It is only used in INSTALLATION-OS and doesn't make sense to be
used in another context, given that file systems now automatically pull their
dependencies since commit 45eac6cdf5 (services:
Add file system utilities to profile).

* gnu/system.scm (%base-packages-disk-utilities): Deprecate and rename to...
* gnu/system/install.scm (%installer-disk-utilities): ... this.
(installation-os) [packages]: Adjust accordingly.
2022-12-05 10:38:41 -05:00
Maxim Cournoyer
08dc9f2ca2
gnu: Do not use 'local-file' in Raspberry Pi OS examples.
As this breaks the 'tests/guix-system.sh' test.

* gnu/system/examples/raspberry-pi-64-nfs-root.tmpl (%my-public-key): Delete
variable.
(raspberry-pi-64-nfs-root) [services]: Remove key from openssh-configuration.
* gnu/system/examples/raspberry-pi-64.tmpl: Likewise.

Reported-by: Vagrant Cascadian <vagrant@debian.org>
2022-12-04 00:37:11 -05:00
Stefan
c7793b82ef
gnu: raspberry-pi: Add a bootloader-chain for the Raspberry Pi and os examples.
* gnu/packages/raspberry-pi.scm (grub-efi-bootloader-chain-raspi-64): New
bootloader variable, capable to boot a Raspberry Pi over network or from a
local storage.
* gnu/system/examples/raspberry-pi-64.tmpl: New operating-system example.
* gnu/system/examples/raspberry-pi-64-nfs-root.tmpl: New operating-system
example for booting over network.
* Makefile.am (EXAMPLES): Register the new files.

Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
2022-12-01 14:31:29 -05:00
Ricardo Wurmus
1a63aea943
linux-container: Do not replace nscd-service-type.
* gnu/system/linux-container.scm (containerized-operating-system): Respect
customizations to the nscd-service-type and only modify the caches field.
2022-12-01 19:52:13 +01:00
Ludovic Courtès
e3c6575ee9
system: hurd: Create more ttys.
* gnu/build/hurd-boot.scm (set-hurd-device-translators)[devices]: Add
more /dev/ttyN nodes.
* gnu/system/hurd.scm (%base-services/hurd): Add more
'hurd-getty-service-type' instances.
2022-11-28 11:19:31 +01:00
Hilton Chain
a6da50d60a
linux-initrd: raw-initrd: Add keyword argument #:pre-mount.
* gnu/system/linux-initrd.scm (raw-initrd): Add keyword argument #:pre-mount.
Document it.
* doc/guix.texi (initial RAM disk): Likewise.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-11-18 15:44:38 +01:00
Thiago Jung Bauermann
a75deb8844
system: image: Define correct docker image arch when cross building
Cross-building a docker image with:

  $ guix system image --image-type=docker --target=aarch64-linux-gnu os.scm

results in an image where the architecture declared in its config.json is
the host architecture rather than the target one.  The binaries are
correctly cross-compiled, so the image can be loaded and used despite the
warning message shown by docker:

  $ docker load -i vcal7bvsqcijchifhqdvprpd1niqh8sk-docker-image.tar.gz
  Loaded image: guix:latest
  $ docker create guix:latest
  WARNING: The requested image's platform (linux/amd64) does not match the
  detected host platform (linux/arm64/v8) and no specific platform was
  requested
  40f06aa869ed690489c4a3824a7f7721bd4bf453b85f25ac7199266939fe2fba
  $ echo $?
  0

This is fixed by passing the correct triplet to the build-docker-image
function.

* gnu/system/image.scm (system-docker-image) Add ‘image-target’ variable.
[builder]: Pass ‘#:system’ argument to ‘build-docker-image’.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
2022-11-04 08:46:11 +01:00
Tobias Geerinckx-Rice
19f3dbcb4d
system: Support bare-bones serial console.
* gnu/system/examples/bare-bones.tmpl (operating-system):
Add a ttyS0 console to kernel-arguments.
2022-10-23 02:00:06 +02:00
Ricardo Wurmus
9c97647446
system: Use a valid license as the dummy license.
* gnu/system/images/wsl2.scm (dummy-package)[license]: Do not use #F.
2022-10-13 17:41:59 +02:00
Hilton Chain
f15a141cf3
file-systems: Add cgroup2 to %pseudo-file-system-types.
* gnu/system/file-systems.scm (%pseudo-file-system-types): Add cgroup2.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-09-26 23:29:38 +02:00
Mathieu Othacehe
2784fcf14d
system: images: Add a TODO comment.
* gnu/system/image.scm (system-tarball-image): Add it.
2022-09-25 09:27:35 +02:00
Alex Griffin
c8112f3bd9
system: images: Add wsl2 module.
* gnu/system/images/wsl2.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
* doc/guix.texi ("System Images"): Document it.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
2022-09-24 14:49:09 +02:00
Alex Griffin
233cf9f036
system: image: Add wsl2 support.
* gnu/image.scm (<image>)[format]: Add wsl2 support.
* gnu/system/image.scm (wsl2-image, wsl2-image-type): New variables.
(image->root-file-system): Add wsl2 image support.
(system-image): Ditto.
2022-09-24 14:49:09 +02:00
Alex Griffin
8757c3f293
system: image: Add tarball support.
* gnu/image.scm (<image>)[fields]: Add tarball to the supported formats.
* gnu/system/image.scm (tarball-image, tarball-image-type): New variables.
(system-tarball-image): New procedure.
(image->root-file-system): Add tarball image support.
(system-image): Ditto.
* doc/guix.texi ("System Images"): Document it.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
2022-09-24 14:49:09 +02:00
Mathieu Othacehe
08a7eb187f
platforms: x86: Rename Hurd hurd to i586-gnu.
* guix/platforms/x86.scm (hurd): Rename it to ...
(i586-gnu): ... this variable.
* gnu/system/images/hurd.scm (hurd-disk-image, hurd-barebones-disk-image,
hurd-barebones-qcow2-image): Adapt those.
2022-09-24 14:49:07 +02:00
Mathieu Othacehe
c009c286a2
image: Make the operating-system field mandatory.
Make the operating-system field mandatory as creating an image without it
makes no sense. Introduce a new macro, image-without-os for the specific cases
where the image is only created to be inherited from afterwards.

* gnu/image.scm (<image>)[operating-system]: Make it mandatory.
* gnu/system/image.scm (image-without-os): New macro.
(efi-disk-image, efi32-disk-image, iso9660-image, docker-image,
raw-with-offset-disk-image): Use it.
* gnu/system/images/hurd.scm (hurd-disk-image): Ditto.
2022-09-24 14:20:36 +02:00
Antero Mejr
d0376f6718
system: install: Do not load amdgpu in the installer image.
* gnu/system/install.scm (installation-os): Add amdgpu to
modprobe.blacklist.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
2022-09-16 10:14:39 +02:00
Mathieu Othacehe
e917f1242c
system: images: Define the platform in image-types.
Running the following command where my-pine.scm contains an operating-system
declaration:

guix system image --image-type=pine64-raw my-pine.scm

returns:

guix system: error: package linux-libre-arm64-generic@5.18.19 does not support
x86_64-linux

That's because there's no platform defined in the pine64-raw image-type, hence
the guix system image tries to build the image for the host architecture.

* gnu/system/images/novena.scm (novena-image-type): Use the armv7-linux platform.
* gnu/system/images/pine64.scm (pine64-image-type): Use the aarch64-linux platform.
* gnu/system/images/pinebook-pro.scm (pinebook-pro-image-type): Use the aarch64-linux platform.
* gnu/system/images/rock64.scm (rock64-image-type): Use the aarch64-linux platform.
2022-09-07 14:24:53 +02:00
Mathieu Othacehe
08b8f85e08
system: image: Update my copyright.
* gnu/system/image.scm: Update it.
2022-09-07 14:24:52 +02:00
Mathieu Othacehe
310212e23e
system: image: Remove an unused variable.
* gnu/system/image.scm (sytem-image): Remove it.
2022-09-07 14:24:52 +02:00
Oleg Pykhalov
4b49487838
gnu: system: file-systems: Add shared flag.
* gnu/build/file-systems.scm (mount-flags->bit-mask, mount-file-system):
Handle shared flag.
* gnu/system/file-systems.scm (invalid-file-system-flags): Add shared to known
flags.
* guix/build/syscalls.scm (MS_SHARED): New variable.
* doc/guix.texi (File Systems): Document shared flag.
2022-08-10 07:12:25 +03:00
Ricardo Wurmus
26af06b66b
linux-container: container-script: Parse command line options.
* gnu/system/linux-container.scm (container-script): Accept command line
options to bind mount host directories into the container.
* doc/guix.texi (Invoking guix system): Document options.
2022-08-09 20:32:13 +02:00