Commit graph

2259 commits

Author SHA1 Message Date
Florian Klink
fd61db7a32
Merge pull request #299717 from ElvishJerricco/systemd-debug-shell
nixos/systemd: Enable debug-shell.service.
2024-04-01 17:20:24 +02:00
Will Fancher
df32b558b5 nixos/systemd: Enable debug-shell.service. 2024-03-29 17:32:38 -04:00
Will Fancher
7fc25040e2
Merge pull request #277759 from onny/initrd-keyfiles
nixos/initrd-ssh: Add authorizedKeyFiles option
2024-03-29 00:24:00 -04:00
Janne Heß
fcc95ff817 treewide: Fix all Nix ASTs in all markdown files
This allows for correct highlighting and maybe future automatic
formatting. The AST was verified to work with nixfmt only.
2024-03-28 09:28:12 +01:00
Janne Heß
bc77c7a973 treewide: Mark Nix blocks in markdown as Nix
This should help us with highlighting and future formatting.
2024-03-28 09:28:12 +01:00
Will Fancher
c77e28a013
Merge pull request #298201 from philiptaron/fix-initrd-activation-with-gpt-auto
nixos/systemd/initrd: make systemd mount root as `rw` when using gpt-auto to find it
2024-03-26 18:09:33 -04:00
Sandro
c51e10cbd2
Merge pull request #283240 from Aleksanaa/nixos/plymouth
nixos/plymouth: improving documentation of logo option
2024-03-24 21:53:08 +01:00
Philip Taron
e2e43f6ce7
nixos/systemd/initrd: make systemd mount root as rw if gpt-auto is set 2024-03-22 16:08:29 -07:00
Vladimír Čunát
e90be8418d
Merge #284149: nixos/kernel: add hid_corsair to initrd modules 2024-03-22 14:59:18 +01:00
nikstur
d5d1e6a4fa
Merge pull request #297227 from WilliButz/uki/expose-rendered-config
nixos/uki: add configFile option
2024-03-20 10:41:59 +01:00
Will Fancher
f0701b576a
Merge pull request #290061 from SuperSandro2000/kernel-modules-package-name
nixos/boot: move name overwrite to pkgs.aggregateModules to option
2024-03-19 13:04:19 -04:00
WilliButz
e9fa0ec5fe
nixos/uki: add configFile option
This option makes it easier to reuse a system's ukify.conf without the
need for manually calling the generator on `settings` again to receive a
rendered configuration file.

Theoretically, a complete configuration file could now be provided by
users.
2024-03-19 17:58:28 +01:00
Will Fancher
57f69255d7
Merge pull request #293591 from lf-/jade/fix-luksroot-assert
nixos.luksroot: fix assertion message to name correct option
2024-03-18 17:46:11 -04:00
Jade Lovelace
a72afcbc48 nixos.luksroot: fix assertion message to name correct option 2024-03-18 14:41:47 -07:00
Will Fancher
99587a3411
Merge pull request #209964 from Majiir/fix-initrd-systemd-closure
nixos/systemd/initrd: follow init param symlinks
2024-03-18 14:39:37 -04:00
Florian Klink
70d7abc09c
Merge pull request #296924 from flokli/document-servers-empty-fallback
nixos/timesyncd: further document services.timesyncd.servers
2024-03-18 20:08:22 +02:00
Florian Klink
78d8e2ca11 nixos/timesyncd: further document services.timesyncd.servers
Running systemd-timesyncd with an empty list of timeservers to sync from
does not work.

In case an empty list is configured here, systemd will fall back to its
compiled-in defaults, which NixOS sets to `{0..4}.nixos.pool.ntp.org`,
as per https://github.com/systemd/systemd/blob/main/docs/DISTRO_PORTING.md#ntp-pool

This has caused some confusion. Explicitly document this, and describe
how to disable timesyncd.
2024-03-18 17:23:55 +02:00
Jonas Heinrich
30036c3d10 nixos/initrd-ssh: Add authorizedKeyFiles option 2024-03-18 15:27:15 +01:00
nikstur
a1c4f0a754
Merge pull request #282022 from ElvishJerricco/gpt-auto-root
nixos: Support systemd-gpt-auto-root
2024-03-18 10:27:22 +01:00
Will Fancher
486e837cbe
Merge pull request #293710 from B4dM4n/networkd-policy-rule-port-range
nixos/networkd: allow RoutingPolicyRule port ranges
2024-03-17 12:36:30 -07:00
Will Fancher
f1731f2e28 nixos: Support systemd-gpt-auto-root 2024-03-15 18:22:04 -04:00
Arian van Putten
16526f454f nixos/binfmt: fix race condition between systemd-tmpfiles and systemd-binfmt
We need to make sure systemd-tmpfiles-setup.service ran before we
start systemd-binft.service. Otherwise it might fail to start
due to non-existant files

Fixes #295365
2024-03-12 21:08:03 +01:00
Jared Baur
2837c0d9aa
nixos/uki: add ".dtb" section if devicetree is used
This ensures a ".dtb" PE section makes it into the UKI so systemd-stub
can install the correct devicetree for use by the Linux kernel. This is
often needed on systems that boot with u-boot since the devicetree used
by u-boot is often a paired down version of what the Linux kernel needs.
On those kinds of boards, the lack of this PE section means that u-boot
will end up installing its internal devicetree into the UEFI
configuration table, which is what the Linux kernel ends up using.
2024-03-11 12:42:21 -07:00
Will Fancher
f592a7ea77
Merge pull request #293720 from vkleen/fix/systemd-boot-random-seed
nixos/systemd: Only include systemd-boot-random-seed if the unit exists
2024-03-09 21:01:35 -05:00
r-vdp
4c26c97d21
nixos/networkd: add missing UseGateway key in the DHCPv4 section 2024-03-08 10:54:03 +01:00
Viktor Kleen
0aed32b9dd
nixos/systemd: Only include systemd-boot-random-seed if the unit exists
The unit file is only present if systemd was built with bootloader support.
2024-03-08 08:52:11 +00:00
Fabian Möller
f753e58e6e
nixos/networkd: allow RoutingPolicyRule port ranges
Linux and Systemd allow port ranges to be used in routing policy rules.

https://www.freedesktop.org/software/systemd/man/latest/systemd.network.html#SourcePort=
2024-03-06 09:11:54 +01:00
r-vdp
a8ab8b59a7
systemd-boot: introduce options to set a sort-key for systemd-boot entries
Without sort-keys specified on entries, the entries are sorted only by
file name (in decreasing order, so starting at the end of the alphabet!),
without taking any other fields into account (see
[the boot loader specification reference][1]).
Moreover, entries without a sort-key are always ordered after all
entries with a sort-key, so by not adding a sort-key to the NixOS ones,
we cannot add a sort-key to any other entry while keeping it below the
NixOS entries.

So currently we have options to set the file names for additional entries like
memtest and netbootxyz.
However, as mentioned above, the sorting by file name is not very intuitive and
actually sorts in the opposite order of what is currently mentioned in the option
descriptions.

With this commit, we set a configurable sort-key on all NixOS entries,
and add options for setting the sort-keys for the memtest and netbootxyz
entries.
The sorting by sort-key is more intuitive (it starts at the start of the
alphabet) and also takes into account the machine-id and version for entries
with identical sort-keys.

We use a bootspec extension to store the sort keys, which allows us to
redefine the sort key for individual specialisations without needing any
special casing.

[1]: https://uapi-group.org/specifications/specs/boot_loader_specification/#sorting
2024-03-02 02:11:32 +01:00
nikstur
1df98b23f6
Merge pull request #292061 from nikstur/systemd-random-seed
nixos/systemd: include systemd-boot-random-seed.service
2024-03-01 21:46:39 +01:00
Silvan Mosberger
cd5dc76d83 substitute: Deprecate replacements, introduce replacementsList
Also:
- Add tests
- Treewide update
- Improve docs
2024-02-29 00:35:27 +01:00
nikstur
380f36f350 nixos/systemd: include systemd-boot-random-seed.service
This is necessary to properly refresh the boot loader random seed.
See https://www.freedesktop.org/software/systemd/man/latest/systemd-boot-random-seed.service.html#
2024-02-28 12:14:06 +01:00
nikstur
bd4c49f29b nixos/systemd: remove a superfluous override
This is already the upstream default.
2024-02-28 11:45:39 +01:00
Will Fancher
b9fe04d671
Merge pull request #291825 from WilliButz/repart/max-label-length
nixos/systemd-repart: add assertion for partition label length
2024-02-27 20:37:02 -05:00
aleksana
ec87671bd1 nixos/plymouth: improving documentation of logo option 2024-02-28 09:35:44 +08:00
Will Fancher
a587a6a357
Merge pull request #285401 from sdht0/systemd-boot-xbootldr
nixos/systemd-boot: Add support for an XBOOTLDR partition
2024-02-27 20:35:03 -05:00
Will Fancher
031978580c
Merge pull request #291882 from philiptaron/systemd-networkd/boolValuesPlus
nixos/networkd: accept `true` and `false` in addition to "yes" and "no" for DHCP= and LinkLocalAddressing=
2024-02-27 20:33:08 -05:00
Sandro
9c1ea5e3a2
Merge pull request #267012 from alois31/plymouth-unbloat
nixos/plymouth: drop the X11 renderer in the initrd
2024-02-27 22:28:27 +01:00
Philip Taron
27d6c242ea
nixos/networkd: accept true and false in addition to "yes" and "no" for DHCP= and LinkLocalAddressing=
These were the only two systemd configuration values that were missing the `boolValues ++` treatment, according to my `rg` through the codebase.
2024-02-27 08:53:32 -08:00
WilliButz
4d59ace14f
nixos/systemd-repart: add assertion for partition label length
The maximum length for a GPT label supported by systemd is 36
characters. When a repart definition contains a label that is longer
than the supported maximum length, it is ignored by systemd-repart and
a log message is produced.

The new assertion makes this obvious to the user at evaluation time,
allowing them to either drop the property entirely or choose a supported
label within the length limit instead.
2024-02-27 17:38:14 +01:00
Siddhartha
b470b4432d nixos/systemd-boot: Add support for an XBOOTLDR partition 2024-02-26 21:55:49 -05:00
Julien Malka
d882852f8b
Merge pull request #291160 from jmbaur/systemd-boot-builder-cross 2024-02-26 21:43:23 +01:00
Ryan Lahfa
077d41f9d8
Merge pull request #289856 from pennae/supfs-set
nixos/filesystems: make supportedFilesystems an attrset
2024-02-25 18:05:29 +01:00
Jared Baur
a786cc0227
nixos/systemd-boot: fix cross for lint check
Since we are not in a `callPackage` context, dependencies in
`nativeBuildInputs` don't get spliced to the buildPlatform, causing a
cross-compiled nixos system to fail at this step when running mypy built
for the hostPlatform.
2024-02-24 08:58:57 -06:00
nikstur
911e22e80d
Merge pull request #288277 from WilliButz/uki/boot-counting-suffix
nixos/boot.uki: add tries option for automatic boot assessment
2024-02-20 22:50:45 +01:00
Florian Klink
8b025e80dc
Merge pull request #288690 from maralorn/drop-unused-fs-binding
nixos: Drop unused variable in systemd/initrd.nix
2024-02-20 14:12:58 +07:00
Sandro Jäckel
191e258e6c
nixos/boot: move name overwrite to pkgs.aggregateModules to option
Before there was a kernel modules path named kernel-modules which then got turned
into linux-X.X.XX-modules-shrunk. Now the unshrunk package is called linux-X.X.XX-modules
and gets turned into X.X.XX-modules-shrunk.
2024-02-20 00:13:16 +01:00
pennae
258b935d70 nixos/filesystems: make supportedFilesystems an attrset
this lets us *dis*able filesystem explicitly, as is required by e.g. the
zfs-less installer images. currently that specifically is only easily
possible by adding an overlay that stubs out `zfs`, with the obvious
side-effect of also removing tooling that could run without the kernel
module loaded.
2024-02-19 11:46:52 +01:00
Majiir Paktu
58a373809a nixos/systemd/initrd: follow init param symlinks 2024-02-18 14:57:12 -05:00
Adam Stephens
1012b2a368 nixos/boot/kernel: add kernelPatches example of using kernel mailing list mbox url 2024-02-17 21:21:52 +11:00
WilliButz
fbaf7446ec
nixos/boot.uki: add tries option for automatic boot assessment
See https://uapi-group.org/specifications/specs/boot_loader_specification/#boot-counting
and https://systemd.io/AUTOMATIC_BOOT_ASSESSMENT/ .

Related to #284135.
2024-02-16 11:31:40 +01:00