Commit Graph

2621 Commits

Author SHA1 Message Date
Florian Klink
ddf728e50b
Merge pull request #306926 from tie/networkd-global-ipv6-privacy-extensions
nixos/networkd: allow IPv6PrivacyExtensions in networkd.conf
2024-05-08 14:41:08 +03:00
Artturin
5ce6ea92e3
Merge pull request #301827 from kampka/forbiddenDependenciesRegex
nixos/top-level: Turn `system.forbiddenDependenciesRegex` into a list
2024-05-06 21:07:03 +03:00
Sandro Jäckel
21ab17debe
nixos/dbus: fix switching from dbus-broker to dbus 2024-05-04 21:56:17 +02:00
Christian Kampka
8814c364a3 nixos/top-level: Rename system.forbiddenDependenciesRegex to system.forbiddenDependenciesRegexes
and turn it in to a list.

The current setting of system.forbiddenDependenciesRegex is a string, meaning only one such regex as any additional setting would result in conflicts.

As maintainers have already started using this setting eg. in profiles, it would be good if this setting would accept a list of regex to allow the end
user to make use of it in addition to package maintainers.
2024-05-02 21:08:39 +03:00
Anomalocaridid
52ad64b548
nixos/grub: fix documentation for boot.loader.grub.theme (#305663)
Closes #233865. Currently, the documentation for `boot.loader.grub.theme` misleadingly implies that it needs a package for a grub theme instead of a path to a grub theme.
2024-05-02 17:43:24 +00:00
nicoo
d8e31f6617
nixos/systemd-boot: Avoid remote mypy executions (#263397) 2024-04-30 15:56:27 +00:00
Ivan Trubach
37a3ad0c01 nixos/networkd: allow IPv6PrivacyExtensions in networkd.conf
This change adds support for setting IPv6PrivacyExtensions= in
systemd.network.config.networkConfig.

https://www.freedesktop.org/software/systemd/man/latest/networkd.conf.html#IPv6PrivacyExtensions=

Added in systemd version 254.
2024-04-26 10:30:19 +03:00
Jörg Thalheim
a4a18f7b92 nixos/systemd-boot: avoid expensive mypy builds on configuration changes
* Mypy dependencies pull in quite a few packages, which makes it harder to create offline installers.
2024-04-23 20:05:26 +02:00
Florian Klink
5a2d4496d3
Merge pull request #297726 from r-vdp/systemd-unit-names
systemd: add a name option to all systemd units
2024-04-23 12:58:51 +03:00
r-vdp
9258f57625
systemd: add a name option to all systemd units
This allows us to set things like dependencies in a way that we can
catch typos at eval time.
So instead of
```nix
systemd.services.foo.wants = [ "bar.service" ];
```
we can write
```nix
systemd.services.foo.wants = [ config.systemd.services.bar.name ];
```
which will throw an error if no such service has been defined.

Not all cases can be done like this (eg template services), but in a lot
of cases this will allow to avoid typos.

There is a matching option on the unit option
(`systemd.units."foo.service".name`) as well.
2024-04-15 11:32:45 +02:00
Astrid Yu
ed854ed0e3 nixos/networkd: add [Bridge] section to netdev conf
This setting was missing from netdev.

This commit additionally adds a test using the new
section, ensuring that STP can be enabled.
2024-04-14 15:16:44 -07:00
stuebinm
6afb255d97 nixos: remove all uses of lib.mdDoc
these changes were generated with nixq 0.0.2, by running

  nixq ">> lib.mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix
  nixq ">> mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix
  nixq ">> Inherit >> mdDoc[remove]" --batchmode nixos/**.nix

two mentions of the mdDoc function remain in nixos/, both of which
are inside of comments.

Since lib.mdDoc is already defined as just id, this commit is a no-op as
far as Nix (and the built manual) is concerned.
2024-04-13 10:07:35 -07:00
pennae
4e21f361d6
Merge pull request #154952 from colemickens/extlinux
extlinux-conf-builder: specialisations entries
2024-04-09 18:49:08 +02:00
nikstur
4c397ea6de systemd-lib: include GPTMaxLabelLength constant 2024-04-08 16:42:25 +02:00
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