Commit graph

1270 commits

Author SHA1 Message Date
Rutherther
f1f27c6838
vm-image.tmpl: Allow empty passwords in base-services.
Change-Id: Ia16fc0418bb9eee29625504a800300958b173c4c
Signed-off-by: Rutherther <rutherther@ditigal.xyz>
2025-12-20 13:37:10 +01:00
Rutherther
36c3a0a640
system: Reinstate lock-mounts work around for system containers.
The underlying problem for system containers still hasn't been
solved, the part of issue 78356 that has been solved is only
home containers.

This reverts commit cbc35fd9aa.
This is a work around for #4788 (previously https://issues.guix.gnu.org/78356).

* gnu/system/linux-container.scm (container-script): Disable lock-mounts?

Change-Id: Ib8eacfc1f1f1a858acf19beb6c14e12c4648b8d9
2025-12-16 09:32:07 +01:00
Rutherther
e3c33d9ab4
image: esp32-partition/grub: Pass root to initialize-efi32-partition.
Follow up of: ca0ed91b40 where the root argument has been omitted.
This leads to an error, because initialize-efi32-partition expects
`root` as first argument, while `#:grub-efi32` was given.
Fixes: #4634.

* gnu/system/image.scm (esp32-partition/grub): Pass 'root' as first argument
to initialize-efi32-partition.

Change-Id: Ia839f40444304c229aef33e996c66c8209e42dda
Signed-off-by: Rutherther <rutherther@ditigal.xyz>
2025-12-13 14:26:52 +01:00
Giacomo Leidi
c425bac93d
Update Giacomo's email address.
The change was automated via:

git grep -l goodoldpaul@autistici.org |
    xargs sed -i 's/goodoldpaul@autistici.org/therewasa@fishinthecalculator.me/g'

* .mailmap: New entry.

Change-Id: I1629388334695d221647afe6a14faf61af5fe0d6
Signed-off-by: Maxim Cournoyer <maxim@guixotic.coop>
2025-12-03 14:38:09 +09:00
Rutherther
e12ba8c865
image: Fix bootloader-uses-grub-efi logic.
* gnu/system/image.scm (bootloader-uses-grub-efi?):
Check by symbol names, not by bounded symbols.

Change-Id: Ia50b07a160ca9c081c9e4cb5e3d6ebdabc89ad4c
Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
2025-12-02 12:06:17 +02:00
Rutherther
ca0ed91b40
image: Supply grub-efi from esp partition initializer.
Instead of passing down grub-efi in system-disk-image,
pass it down only where it's necessary - in esp partitions.

Since the esp partitions are only for grub, I renamed them
so that it's more clear to future users of them. They
do not check the bootloader of os at all, they always
initialize grub.

Followup of 1dfe1ebdf6,
fixing regression for mbr-hybrid images.

Fixes: #4538.

* guix/system/image.scm
(esp-partition/grub): Rename from esp-partition; Pass grub-efi to
initialize-efi-partition.
(esp32-partition/grub): Rename from esp32-partition; Pass grub32-efi to
initialize-efi-partition.
(esp-partition, (esp32-partition): Deprecate.
(system-disk-image): Do not supply grub-efi arguments.

Change-Id: I336c3144e8efc3ce872031e631d64d3708546ff8
Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
2025-12-02 12:05:45 +02:00
Yelninei
c248c4442b
system: examples: Add machine argument to qemu for hurd64
Change-Id: I30bb65819421b71bb78f6b51dde79540fd8a504a
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-11-29 18:46:51 +01:00
Efraim Flashner
3a95404e15
system: image: Expand list of bootloaders using grub-efi.
* gnu/system/image.scm (bootloader-uses-grub-efi?): Add the other
grub-efi* bootloader names.

Change-Id: I5b7140db16022601fbf7326f45ebe0a058640c1c
2025-11-26 13:17:38 +02:00
Efraim Flashner
1dfe1ebdf6
system: image: Don't add grub-efi to the build closure unless needed.
* gnu/system/image.scm (system-disk-image)[partition-image]: In the
initializer don't unconditionally refer to grub-efi and grub-efi32
unless they might be needed.

Change-Id: I6eca21e162c233cd57e840a525788af831ad6b6b
2025-11-26 13:17:38 +02:00
Efraim Flashner
5df3514ab0
system: image: Factor out testing for grub-efi bootloader.
* gnu/system/image.scm (system-disk-image)[partition-image]: When
testing if a partition needs to be GPT formatted, factor out the test
for an grub-efi based bootloader.
(bootloader-uses-grub-efi?): New variable.

Change-Id: I62de5962b1246dcec15f0851e58234497d1426d9
2025-11-26 13:17:34 +02:00
Denis 'GNUtoo' Carikli
35770c78a2
image: Add support for swap.
* gnu/build/image.scm (make-swap-image): New variable.
  (make-partition-image): Support swap.
* gnu/system/image.scm (system-disk-image): Support swap.
* doc/guix.texi: (partition Reference): Support swap.

Change-Id: I1c201e6aa5dd207d53e5732617910860ee894990
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-11-24 23:22:52 +01:00
Denis 'GNUtoo' Carikli
5e5ac81e95
image: Add support for f2fs.
* gnu/build/image.scm (make-f2fs-image): New variable.
  (make-partition-image): Support f2fs.
  (estimate-partition-size): Add optional margin.
* gnu/system/image.scm (system-disk-image): Support f2fs.
* doc/guix.texi: (partition Reference): Support f2fs.

Change-Id: Ia7fc4483c3cc1af5f34fac86a529a90a1bd7c2c6
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-11-24 23:22:51 +01:00
Denis 'GNUtoo' Carikli
f89bbcb653
image: export efi32-disk-image.
* gnu/build/image.scm (efi32-disk-image): Export.

Change-Id: I45ddcdafab12cdcc8f33a574f55387651f1048f8
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-11-24 23:21:56 +01:00
Carlo Zancanaro
0f96ceb58f
gnu: Add --pid-file option to "guix system container" scripts.
* gnu/system/linux-container.scm (container-script): Accept pid-file command
line option to write out the container's process ID.
* doc/guix.texi (Invoking guix system): Document new option.

Change-Id: I93e8a99b39c1dd831f116104bf92c723d96c9965
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-11-13 21:55:42 +01:00
Sören Tempel
08db14c74f
file-systems: Support the 'remount' mount flag.
This allows remounting file systems which are already mounted by
the initrd with custom mount options (e.g. /proc with hidepid=2).

* gnu/build/file-systems.scm (mount-flags->bit-mask): Map 'remount
to MS_REMOUNT.
* gnu/system/file-systems.scm (invalid-file-system-flags): Add
'remount to the list of KNOWN-FLAGS.
* doc/guix.texi (File Systems): Document it.

Fixes: guix/guix#3849
Change-Id: I0ab116a5b4f7bd201e955ecf022e260c63828dc4
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-11-06 23:29:46 +01:00
Maxim Cournoyer
cbc35fd9aa
system: Reinstate lock mounts in `container-script'.
This issue should now be resolved, with a test guarding it from re-appearing.

* gnu/system/linux-container.scm (container-script) [#:lock-mounts]: Delete
argument.

Change-Id: I93e94a0ee349c53967275b82e1a9a5bcc8e8f65c
2025-10-29 11:34:28 +09:00
Maxim Cournoyer
10edda5aa5
Reinstate "linux-container: Remove #:lock-mounts? and related code."
This reverts commit e0e64be8de.
2025-10-29 11:34:28 +09:00
Ludovic Courtès
1e89d93158
system: Set ‘HISTSIZE’ in default bashrc.
This provides more appropriate defaults for today.  This change affects
/etc/bashrc, /etc/skel/.bashrc, along with ~/.bashrc for Home users.

* gnu/system/shadow.scm (%default-bashrc): Set ‘HISTSIZE’.

Change-Id: I4ffa7ad75c6f39f3f36d5a15ce420eae52e241e5
2025-10-23 19:35:07 +02:00
Florian Pelz
e1ac468d22
install: Add node name in Italian.
* gnu/system/install.scm (%installation-node-names): Add "it".

Change-Id: Ic736b0ff918b63f36bca988f021a1055273ef709
2025-10-22 10:43:48 +02:00
Rutherther
c346f195fb
vm-image.tmpl: Use /dev/vda2 as root file system device.
The /dev/vda1 partition points to an EFI partition.
The /run/current-system/configuration.scm will then point to an incorrect
partition - to the EFI partition instead of root partition. Fix that by
pointing it to the default root-label "Guix_image".
This allows users to reconfigure out of the /run/current-system/configuration.scm.

* gnu/system/examples/vm-image.tmpl: Switch root filesystem device
to /dev/vda2.

Change-Id: I983892fb3c860dc5bbb2a1654d28db83e88d8c1a
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-10-21 16:30:23 +02:00
Rutherther
4641d4bb8e
vm-image.tmpl: Do not leak local checkout URL.
Follow up of 94c9e53fa4 that made similar change, but in
gnu/system/install.scm.

Change local checkout url for the default channel url to ensure release images
will not leak local checkout url.

* gnu/system/examples/vm-image.tmpl: Change channel of
‘guix’ package to inherit from ‘%default-guix-channel’.

Change-Id: I1c633b44cfa067cae1d2948e7e7ef6922995c27d
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-10-21 16:30:23 +02:00
Sergey Trofimov
a16d6225ee
nss: Allow selecting IP protocol for mDNS lookups.
* gnu/system/nss.scm (mdns-host-lookup-nss): New procedure.
* doc/guix.texi (Name Service Switch): Document it.

Change-Id: Ie4ff4aab6bf41eb2cec69b78a8427594b20bc954
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-10-13 14:48:27 +02:00
Ludovic Courtès
e0e64be8de
linux-container: Remove #:lock-mounts? and related code.
This reverts commits 437bb9ece5 and
a57ed987ff, which were reported in
guix/guix#1169 to occasionally cause errors like:

  guix shell: error: unshare : 268566528: Invalid argument
2025-10-13 14:48:26 +02:00
45mg
73cbb94d1d
mapped-devices/luks: Support extra options.
Allow passing extra options to the 'cryptsetup open' command.

* gnu/system/mapped-devices.scm (luks-device-mapping-with-options):
[#:extra-options]: New argument.
(open-luks-device): Use it.
(check-luks-device): Validate it.
* doc/guix.texi (Mapped Devices): Document it.
* gnu/tests/install.scm (%test-encrypted-root-extra-options-os): New
test for it, as well as the previously untested #:allow-discards?
option.
(%encrypted-root-extra-options-os): New os declaration for the test.

Change-Id: I265a431efb0c81ed7cfc984344c6b8a4cc2f1624
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-10-06 10:21:16 +02:00
Ludovic Courtès
1e37976756
vm: Let ‘%immutable-store’ through.
Fixes guix/guix#1926.

‘guix system vm’ would so far produce a system without the
‘file-system-/gnu/store’ Shepherd service, which is normally provided by
‘%immutable-store’.  This would lead to an error for OS configs that
explicitly require ‘file-system-/gnu/store’, such as those that use
‘qemu-binfmt-service-type’.

* gnu/system/vm.scm (virtualized-operating-system)[user-file-systems]: Remove
filtering of TARGET = (%store-prefix).

Reported-by: Ashvith Shetty <ashvithshetty0010@zohomail.in>
Change-Id: I656df6c3f067e47cd7acd03af437fe757db286d5
2025-10-01 10:45:09 +02:00
David Arroyo
fd888ddf63
gnu: linux-initrd: Fix f2fs module dependencies
The linux kernel has renamed the crc32_generic module to
crc32_cryptoapi. This fixes the f2fs-root-os system test.

* gnu/system/linux-initrd.scm (file-system-type-modules): update module
  name

Change-Id: I73a135e453434e726ea9d3ff99ab1a83b4810a10
Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
2025-09-29 12:56:30 +03:00
Ludovic Courtès
afca847fe3
system: bare-bones: Remove Cuirass service.
This reverts changes from d72eef9c91 that
were inadvertently committed.

* gnu/system/examples/bare-bones.tmpl: Remove Cuirass.

Change-Id: I29253dce841479bbddef00756a0f6bd57694dfae
2025-09-21 18:50:05 +02:00
Denis 'GNUtoo' Carikli
c91b01f1df
images: Add rock-4c-plus support.
* gnu/system/images/rock-4c-plus.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.

Change-Id: I156f552a26c9b2ca9f46353e3e2f3bf50bd88551
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Signed-off-by: Danny Milosavljevic <dannym@friendly-machines.com>
2025-09-18 23:28:19 +02:00
Denis 'GNUtoo' Carikli
d300b9f7f3
system: Add u-boot-rock-4c-plus-rk3399.
* gnu/packages/bootloaders.scm (u-boot-rock-4c-plus-rk3399): New variable.
* gnu/bootloader/u-boot.scm (u-boot-rock-4c-plus-rk3399-bootloader):
  New exported variable.
* gnu/system/install.scm (rock-4c-plus-installation-os):
  New exported variable.

Change-Id: I37025b248178311ccf8246cb0e02ed9399f9c6ac
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Signed-off-by: Danny Milosavljevic <dannym@friendly-machines.com>
2025-09-18 23:28:19 +02:00
Maxim Cournoyer
10482f731e
Reapply "Update Maxim's email address."
This reverts commit a7db92d9b3, this time with
the more careful command, to avoid a world rebuild:

grep -rl --exclude-dir=build --exclude-dir=patches --exclude=ld-wrapper.in \
  --exclude=sitecustomize.py --exclude=guix-emacs.el maxim.cournoyer@gmail.com |
  xargs sed -i 's/maxim.cournoyer@gmail.com/maxim@guixotic.coop/g'

Change-Id: I0871f5cf9ace79e34e78e24154d0da6ea95a3a91
2025-09-18 13:44:12 +09:00
Maxim Cournoyer
a7db92d9b3
Revert "Update Maxim's email address."
This reverts commit d0d87a744d. Oops! This
caused a world rebuild.

Change-Id: I25fff644b2b61d0ee93d69b457b04c72b5b74d15
2025-09-18 12:07:31 +09:00
Maxim Cournoyer
d0d87a744d
Update Maxim's email address.
The change was automated via:

  git grep -l maxim.cournoyer@gmail.com |
    xargs sed -i 's/maxim.cournoyer@gmail.com/maxim@guixotic.coop/g'

* .mailmap: New entry.

Change-Id: Iaa88b1e51c94159c49138fb43910badb990eb169
2025-09-18 08:05:19 +09:00
Ludovic Courtès
b71c347e3c
file-systems: Use ‘no-suid’ and ’no-dev’ for /tmp in the live system.
* gnu/system/file-systems.scm (%base-live-file-systems): Add ‘flags’.

Change-Id: I873d9cddd4d7c495d7e2daad0d8528c085a96841
2025-09-17 11:55:14 +02:00
Ludovic Courtès
d72eef9c91
services: cuirass: Add more configuration fields.
* gnu/services/cuirass.scm (<cuirass-configuration>)[parallel-evaluations]
[evaluation-ttl, web-threads]: New fields.
(cuirass-shepherd-service): Honor them.
* doc/guix.texi (Continuous Integration): Document them.

Change-Id: I33485b978d2a37ee93230b1d425731e6cb3b80e4
2025-09-05 17:25:39 +02:00
Yelninei
4b03c71022
system: image: hurd: Fix typo.
* gnu/system/images/hurd.scm: Fix typo in exported variable.

Change-Id: I4f7ef293978953aa494c3db4cf66a1f5f89037b4
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-08-30 23:52:09 +02:00
Maxim Cournoyer
af9e540b71
gnu: nss-certs: Relocate to (gnu packages nss).
This is made so that the source can be shared without introducing module
circular dependencies.

* gnu/packages/certs.scm (nss-certs)
(nss-certs-for-test): Move to...
* gnu/packages/nss.scm: ... here.

Adjust the module imports via:

  git grep -l '(gnu packages certs)' |
  xargs sed 's/(gnu packages certs)/(gnu packages nss)/' -i

Change-Id: I56d7bc52ddcdffbced8a162e8db8ea5071b0cb0f
2025-08-17 22:34:42 +02:00
Gabriel Wicki
aea73f5b74
gnu: system: Replace deprecated dhcp client service.
* gnu/system/examples/asus-c201.tmpl,
  gnu/system/examples/bare-bones.tmpl,
  gnu/system/examples/beaglebone-black.tmpl,
  gnu/system/examples/raspberry-pi-64-nfs-root.tmpl,
  gnu/system/examples/raspberry-pi-64.tmpl,
  gnu/system/examples/vm-image.tmpl
  gnu/system/images/orangepi-r1-plus-lts-rk3328.scm,
  gnu/system/images/pine64.scm,
  gnu/system/images/rock64.scm,
  gnu/system/images/unmatched.scm,
  gnu/system/images/visionfive2.scm,
  gnu/system/linux-container.scm (services): Replace
dhcp-client-service-type with its replacement dhcpcd-service-type.

Change-Id: Ib1f31d0a95dfa8ee64cf8c10d617ee53c8637b26
2025-07-24 18:46:06 +02:00
Janneke Nieuwenhuizen
db4223a32b
system: examples: devel-hurd64: Fix typo.
Suggested by yelninei via IRC.

* gnu/system/examples/devel-hurd.tmpl: Fix typo in comment.

Change-Id: I4256f530bda30a8792c7dcce3f3bf21780dce6ca
2025-07-18 21:03:52 +02:00
Ludovic Courtès
55a36c48cf
locale: Upgrade ‘%default-locale-libcs’.
This matches the libc users will usually be upgrading from.

* gnu/system/locale.scm (%default-locale-libcs): Replace ‘glibc-2.35’
with ‘glibc-2.39’.

Change-Id: I21c291054cd0948ced2f17e951e97f6db7116688
2025-07-18 20:17:51 +02:00
Ludovic Courtès
14c8728f0d
mapped-devices: luks: Adjust to support extra arguments.
Fixes <https://issues.guix.gnu.org/70826>.

When using ‘luks-device-mapping-with-options’, procedures such as
‘operating-system-boot-mapped-devices’ would fail to identify LUKS
mapped devices because they would check whether the mapped device type
is ‘eq?’ to ‘luks-device-mapping’.

This addresses that by ensuring mapped devices are always of the
‘luks-device-mapping’ type, even when different options are used.

* gnu/system/mapped-devices.scm (close-luks-device): Add #:rest.
(luks-device-mapping-with-options): Deprecate.
* gnu/tests/install.scm (%encrypted-home-os-key-file): Update
accordingly.
* doc/guix.texi (Mapped Devices): Document use of the ‘arguments’ field
of ‘luks-device-mapping’.  Remove ‘luks-device-mapping-with-options’
documentation.
(Bootloader Configuration): Update example with key file in extra
initrd.

Change-Id: I5442908cb8ef4e3891dbb053cccf5e42b895486f
Reported-by: Tadhg McDonald-Jensen <tadhgmister@gmail.com>
2025-07-18 00:57:31 +02:00
Ludovic Courtès
62bf9a7cc7
mapped-devices: Add ‘arguments’ field.
Fixes <https://issues.guix.gnu.org/70826>.

This allows users to specify extra arguments specific to the underlying
mapped device type.

* gnu/system/mapped-devices.scm (<mapped-device>)[arguments]: New field.
(device-mapping-service-type): Honor it.
* guix/scripts/system.scm (check-mapped-devices): Likewise.
* gnu/system/linux-initrd.scm (raw-initrd): Likewise.
* doc/guix.texi (Mapped Devices): Document it.

Reported-by: 45mg <45mg.writes@gmail.com>
Change-Id: Idef5a3e68535c412f13bae9a92c81c49053d4f4a
2025-07-18 00:57:25 +02:00
Janneke Nieuwenhuizen
1ef5cd24a6
system: examples: devel-hurd64: Remove new Linux-specific dependency.
* gnu/system/examples/devel-hurd.tmpl (guix-packages): Also remove
slirp4netns; it is a Linux-specific dependency that does not build for the
Hurd.

Change-Id: I5bca0f44b32d09dd4baa86a6d47d33133a4339c6
2025-07-17 21:22:10 +02:00
Hilton Chain
3ddadfc0fb
gnu: Add %dummy-linux-kernel-for-container.
* gnu/packages/linux.scm (%dummy-linux-kernel-for-container): New variable.
* gnu/system/linux-container.scm (containerized-operating-system): Use it.

Change-Id: Ica49a0cd0b8ae4a78ba5fca879ae73f94e64474a
2025-06-28 22:50:50 +08:00
Hilton Chain
d9ea94dc44
system: skeleton-directory: Create parent directory for target.
This allows specifying the following skeleton, for example:
--8<---------------cut here---------------start------------->8---
`((".config/test.txt" ,[...])
--8<---------------cut here---------------end--------------->8---

* gnu/system/shadow.scm (skeleton-directory): Create parent directory for
target.

Change-Id: I49649000bd6cdab9060f057b47a5122b17027f10
2025-06-27 00:42:15 +08:00
Yelninei
85b5c0c7c2
system: Add zstd to ‘%base-packages/hurd’.
Followup to 3f33cb0314.

* gnu/system/hurd.scm (%base-packages/hurd): Add ‘zstd’.

Change-Id: I101ae815b31b1e4f0aae6222fcf2271e8e0043b1
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-06-20 17:59:02 +02:00
Mazin AlHaddad
1a09cd1882
system: Adjust return value of bashrc.
Fixes a regression introduced in c743d646ee.

Without this, the fish shell integration is broken, and PATH does not include
~/.config/guix/current/bin.

* gnu/system/shadow.scm (%default-bashrc): Fix return value.

Change-Id: I54170caeef7ae541a4901743fcdcbfb353fa09d4
Signed-off-by: Hilton Chain <hako@ultrarare.space>
Modified-by: Hilton Chain <hako@ultrarare.space>
2025-06-12 20:17:49 +08:00
Ludovic Courtès
ed5988f0d2
linux-container: ‘containerized-operating-system’ provides ‘loopback’ service.
Fixes #420.

Previously, in systems produced by ‘guix system container’, the
‘loopback’ Shepherd service would fail to start with EEXIST, because the
“lo” interface already exists in the container.  This commit provides a
fake ‘loopback’ Shepherd service that does nothing.

* gnu/system/linux-container.scm (dummy-networking-service-type): Change
to honor its configuration value.
(containerized-operating-system)[services-to-drop]: Add
‘static-networking-service-type’ in the non-‘shared-network?’ case.
[services-to-add]: Add ‘dummy-networking-service-type’ for loopback in
the non-‘shared-network?’ case.

Reported-by: Antonio Carlos Padoan Junior <acpadoanjr@yahoo.com.br>
Change-Id: I326b5f3b5e08f67b6613c186497c44b1e887b02e
2025-06-04 17:01:23 +02:00
Ludovic Courtès
871f09b6f7
install: Adjust for (package-source guix) not being a <channel>.
Fixes guix/guix#422.

* gnu/system/install.scm (%installation-services)[guix-package-commit]:
New procedure.
<guix-configuration>: Use it instead of ‘channel-commit’.

Change-Id: I6ed5bc3f21a375e639fabfcbcdaf70b6347d1c5c
2025-06-04 16:45:08 +02:00
Maxim Cournoyer
c743d646ee
system: Factorize bashrc default configuration.
This factorizes out the remaining bashrc bits from /etc/skel/.bashrc to a the
template used for both /etc/bashrc on Guix System and ~/.bashrc for
home-bash-service-type.

Rationale: The use of /etc/skel introduce state: the file is only copied
originally when the user account is created, and never (automatically)
refreshed again.

* gnu/system.scm (operating-system-etc-service):
<profile>: Guard against souring /etc/bashrc in non-interactive, SSH case.
<bashrc>: Use %default-bashrc, having migrated the remaining definitions to...
* gnu/system/shadow.scm (%default-bashrc): ... here.  Factorize aliases to...
* gnu/services.scm (%default-bash-aliases): ... here.
(%default-bashrc-d-aliases): New variable.
(%default-etc-bashrc-d-files): Include it in the default configuration.
* gnu/services/base.scm (%base-services): Register etc-bashrc-d-service-type.
* gnu/home/services/shells.scm (add-bash-configuration): Do not set PS1, now
part of %default-bashrc.
(home-bash-configuration) [guix-defaults?]: Update doc.
[aliases]: Set %default-bash-aliases as the default value.  Update doc.
* doc/guix.texi (Shells Home Services): Update documentation.
(Service Reference): Update example.

Change-Id: I340c614983a78fd20a9c4a9705e7fc542ae9b513
2025-05-26 13:43:03 +09:00
Maxim Cournoyer
2345e87c35
gnu: bash: Define the SYS_BASHRC macro.
This causes Bash to treat /etc/bashrc as a startup file, removing the need to
source /etc/bashrc from ~/.bashrc.

* gnu/packages/bash.scm (bash-fixed): New package, with added SYS_BASHRC
define.
(bash) [replacement]: Use it.
* gnu/system/shadow.scm (%default-bashrc): Do not source /etc/bashrc, now done
implicitly.

Change-Id: I5b0afd7d81653ef19c482e5501efdf7e50ef37c0
2025-05-26 13:43:03 +09:00