Commit Graph

2613 Commits

Author SHA1 Message Date
nikstur
5df8caced4 nixos/etc: make re-mounting /etc overlay idempotent 2024-02-21 22:54:00 +01: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
Dominik Xaver Hörl
97d6166176 nixos/etc: fix payload in build-composefs-dump for the file case 2024-02-19 23:27:34 +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
Jade Lovelace
5d1feba540 nixos/systemd.oomd: set the memory pressure thresholds as mkDefault
These should be defaults as they're pretty reasonable to want to
override as a user. Unsure how to change the slice defaults to be
overridable, that should probably be a later conversation.
2024-02-15 09:41:26 -08:00
Michele Guerini Rocco
c1f27ae1d3
Merge pull request #199515 from MangoIV/mangoiv/add-note-to-boot-initrd-secrets
Add documentation for moved secrets in stage 1
2024-02-14 14:35:04 +01:00
maralorn
6634b86601 nixos: Drop unused variable in systemd/initrd.nix 2024-02-14 01:22:58 +01:00
nikstur
4d2c5b722a
Merge pull request #285114 from WilliButz/improve-uki-settings-merging
nixos/boot.uki: allow partial overrides of default UKI settings
2024-02-08 21:15:08 +01:00
Will Fancher
ee9becfdfb
Merge pull request #285315 from jmbaur/sysupdate-fixes
nixos/sysupdate: allow lists in sysupdate config
2024-02-07 03:01:49 -05:00
Florian Klink
7c0a129076
Merge pull request #256652 from giorgiga/rateLimitBurst-documentation
Clarify journal size limit defaults in documentaiton of services.journald.rateLimitBurst
2024-02-06 13:26:35 +01:00
Linus Heckemann
9f571cb4ef
Merge pull request #284508 from nikstur/etc-overlay-leading-slash
nixos/etc: remove leading slash from paths
2024-02-03 18:01:01 +01:00
Nick Cao
0850ee016b
nixos/networkd: drop upstreamed stage-1 unit dependencies
Reference: https://github.com/systemd/systemd/pull/27791
2024-01-31 22:52:52 -05:00
Jared Baur
50866dc20f
nixos/sysupdate: allow lists in sysupdate config
Lists are convenient to have in sysupdate configuration when using
multiple `MatchPattern` under `Target` when the target can have multiple
filenames. This use-case is helpful for BootLoaderSpec bootcounting where the target file on
disk can have multiple filenames, and in order for sysupdate to properly
ensure only N number of instances of this target exist at one time, we
need to have multiple match patterns.
2024-01-31 09:12:28 -08:00
Jörg Thalheim
202e697233 nixos/systemd-boot: fix editor option 2024-01-31 10:46:30 +07:00
WilliButz
ccff749532
nixos/boot.uki: allow partial overrides of default UKI settings
Previously any user-provided config for boot.uki.settings would need to
either specify a full set of config for ukify or a combination of
mkOptionDefault to merge the "settings" attribute set with the module's
defaults and then mkOverride or mkForce to override a contained
attribute.

Now it is possible to trivially override parts of the module's default
config, such as the initrd or kernel command line, but overriding the
full set of settings now requires mkOverride / mkForce.
2024-01-30 23:54:40 +01:00
nikstur
a9161ceb5a nixos/etc: remove leading slash from target paths in build-composefs-dump.py
This is necessary so that duplicates in the composefs dump are avoided.
2024-01-28 13:37:23 +01:00
Will Fancher
6f1b17d4b8 systemd-stage-1: Fix hibernate-resume with systemd v255 2024-01-28 06:52:21 -05:00
nikstur
92b98478a8 nixos/etc: fix type checking of build-composefs-dump.py 2024-01-28 01:58:56 +01:00
Julien Malka
ceeddc5b15 nixos/systemd-boot: move builder script in bin folder 2024-01-27 01:29:40 +00:00
Lorenz Brun
b8b53fdf37 nixos/kernel: add hid_corsair to initrd modules
Same as all the other HID drivers, otherwise Corsair keyboards do not
work before the switch to stage2 without custom configuration.
2024-01-27 02:11:57 +01:00
Will Fancher
0d85bf0efe nixos/systemd: Temporarily bring back multi-user -> network-online
There were several modules, critically including NetworkManager, which
were not prepared for this change. Most of the change was good,
however. Let's bring back the dependency and change the assertion to a
warning for now.
2024-01-25 15:53:52 -05:00
github-actions[bot]
8c2ba7797a
Merge master into staging-next 2024-01-25 12:01:19 +00:00
Julien Malka
39a2e0bb03
Merge pull request #283396 from newAM/clevis-clarify 2024-01-25 08:52:44 +01:00
github-actions[bot]
5af80acc9a
Merge master into staging-next 2024-01-25 06:01:04 +00:00
Jörg Thalheim
559ddda570
Merge pull request #279852 from Madouura/pr/bcachefs
bcachefs: update comments, release-notes, only use IFS for bcachefs, update bcachefs-tools and module
2024-01-25 01:11:04 +01:00
Alex Martens
c37de24b78 nixos/clevis: clairify secret creation 2024-01-23 20:46:52 -08:00
github-actions[bot]
01a65d81f3
Merge master into staging-next 2024-01-23 18:00:56 +00:00
Niklas Hambüchen
aa6c8ae3a6
Merge pull request #253488 from nh2/install-grub-dont-stat-network-fs
install-grub.pl: Do stat() last to not hang on hanging network FS
2024-01-23 16:36:49 +01:00
Niklas Hambüchen
b9ba9df3e8 install-grub.pl: Do stat() last to not hang on hanging network FS 2024-01-23 15:34:40 +00:00
github-actions[bot]
3c7375b75c
Merge master into staging-next 2024-01-22 18:00:55 +00:00
nikstur
733c8ee469
Merge pull request #282086 from nikstur/uki
nixos/uki: init
2024-01-22 17:43:09 +01:00
github-actions[bot]
3a8094730e
Merge master into staging-next 2024-01-22 12:01:10 +00:00
Linus Heckemann
18e5176621
Merge pull request #270727 from nikstur/nixos-perlless-activation
Perlless Activation
2024-01-22 10:11:44 +01:00
nikstur
60f529fc82 nixos/etc: optionally mount etc as an overlay 2024-01-22 00:54:13 +01:00
github-actions[bot]
4dea63e421
Merge master into staging-next 2024-01-20 18:01:02 +00:00
h7x4
e7069e4aa2
Merge pull request #281055 from majiru/resolved-dns-over-tls
nixos/resolved: add dnsovertls option
2024-01-20 15:21:45 +01:00
Jacob Moody
dfc87b9048 nixos/resolved: add dnsovertls option 2024-01-19 21:29:22 -06:00
github-actions[bot]
650e10b010
Merge master into staging-next 2024-01-20 00:02:16 +00:00
Julien Malka
42ad0d80ce
Merge pull request #281639 from Mic92/systemd-refactoring 2024-01-19 19:42:32 +01:00
github-actions[bot]
331c789712
Merge master into staging-next 2024-01-19 18:01:00 +00:00
nikstur
985bafa5fc nixos/uki: init 2024-01-19 17:04:59 +01:00
Zolo
c9e7344950
Update systemd-boot.nix
Extending the systemd-boot information and where to find more information.
2024-01-19 14:01:26 +01:00
github-actions[bot]
4679030218
Merge master into staging-next 2024-01-19 12:01:13 +00:00
Will Fancher
367d101073 nixos/systemd: assert After=network-online.target -> Wants=
This will catch broken services at the evaluation stage.
2024-01-18 16:28:41 -08:00
Jade Lovelace
62f30634db nixos/systemd: don't require network-online.target for multi-user.target
Previously we required network-online.target for multi-user.target. This
has made a lot of people very angry and has been widely regarded as a
bad move (or at least, very nonstandard):
15d761a525 (commitcomment-128564097)

This was done because of fragile tests and services declaring
dependencies on multi-user.target when they meant network-online.target.

Let's rip off the bandaid and fix our tests.
2024-01-18 16:28:39 -08:00
nikstur
eec1845744 nixos/systemd-sysusers: init 2024-01-18 23:08:14 +01:00
github-actions[bot]
dc4a7c97b0
Merge master into staging-next 2024-01-18 18:00:55 +00:00
Janne Heß
15c31afd8a
Merge pull request #271067 from nikstur/sysinit-reactivation
nixos/switch-to-configuration: add sysinit-reactivation.target
2024-01-18 16:13:32 +01:00
nikstur
e6b66f08a5 nixos/switch-to-configuration: add sysinit-reactivation.target 2024-01-18 00:46:30 +01:00
Jörg Thalheim
4a20af3932 nixos/systemd-boot: move all template variables in one place
This makes it easier to reason about what variables are inserted during packaging.
We also make sure that template file is also valid python syntax, which makes editor errors go away during development.
2024-01-17 22:53:17 +01:00
nikstur
748378a3ec systemd: 254.6 -> 255.2
Removed patches:

- 0007-Fix-hwdb-paths.patch

  The directory we want seems to already be included in the list. Is there
  a reason why we want to restrict it further?

- 0010-build-don-t-create-statedir-and-don-t-touch-prefixdi.patch

  This patch has little to do with how the meson.build file looks now. The
  new patch 0017 is the successor to this one.

- 0015-pkg-config-derive-prefix-from-prefix.patch

  This is fixed upstream. We don't need this anymore.
2024-01-17 14:13:46 +01:00
Madoura
d86395db78
nixos/stage-1.init.sh: only set 'IFS' in 'waitDevice' for bcachefs 2024-01-16 15:06:05 -06:00
Madoura
919c05460b
nixos/stage-1.init.sh: fix IFS comment grammar 2024-01-16 15:06:04 -06:00
Will Fancher
bf54848f3b
Merge pull request #280232 from jmbaur/sysupdate-example-fix
nixos/sysupdate: fix example text
2024-01-16 15:43:05 -05:00
Will Fancher
66e3ec7d30
Merge pull request #278895 from jmbaur/repart-initrd-loopback
nixos/repart: add loop module to initrd
2024-01-16 15:40:19 -05:00
Maciej Krüger
c0ef1f9479
nixos/network-interfaces: add assertion if used in after or wants 2024-01-12 17:29:05 +01:00
Jared Baur
d177e2ef06
nixos/sysupdate: fix example text
The example systemd-sysupdate transfer name has a ".conf" suffix,
although the files on the final system are already appended with this
suffix, so the file ends up being "transfer-name.conf.conf". Remove the
suffix in the example so that users will get a transfer filename they
expect.
2024-01-11 01:47:36 -08:00
Ryan Lahfa
176e84d44f
Revert "nixos/systemd-boot: init boot counting" 2024-01-11 01:00:43 +01:00
Julien Malka
eb435897a6 nixos/systemd-boot: init boot counting 2024-01-07 11:34:09 +00:00
Jared Baur
1dad7f6821
nixos/repart: add loop module to initrd
Systemd-repart will use loopback devices for partition creation if it is
able to, and will fallback to doing "offline" partition creation writing
data directly to files. From what I see looking at the repart code,
there are specific features that cannot be taken advantage of when not
using loopback devices (e.g. no BTRFS subvolumes in systemd v255) and in
certain places they have to perform some manual re-sizing work that can
otherwise be avoided.
2024-01-05 01:04:30 -08:00
github-actions[bot]
1e290d634f
Merge master into staging-next 2024-01-05 00:02:27 +00:00
Raito Bezarius
7c6f64914f system/activation/bootspec: do not synthesize initrdSecrets if unneeded
We should not always create an appender script if we have no secret, this has no usefulness whatsover.
2024-01-04 23:11:23 +01:00
Raito Bezarius
b3d998e7ea boot/loader/systemd-boot: BootSpec makes initrdSecrets optional
A bootspec could remove the `initrdSecrets` attribute and is a perfectly valid bootspec, as can be seen
in the bootspec.cue.

This makes the builder not fail upon missing `initrdSecrets`.
2024-01-04 23:11:22 +01:00
github-actions[bot]
dc84f21849
Merge master into staging-next 2024-01-03 12:01:04 +00:00
Will Fancher
05706b850a
Merge pull request #273695 from lopsided98/initrd-systemd-lib-firmware
systemd-stage-1: allow non-existent /lib/firmware
2024-01-03 04:30:27 -05:00
Sandro Jäckel
27468aae96
nixos/oomd: add missing section to use slice 2024-01-03 02:45:38 +01:00
Sandro Jäckel
0a1d1907a5
nixos/oomd: use mkRenamedOptionModule like mentioned in the changelog 2024-01-01 22:33:00 +01:00
github-actions[bot]
e61ae81f8f
Merge master into staging-next 2024-01-01 00:02:16 +00:00
Ryan Lahfa
e44341e335
Merge pull request #195805 from Luflosi/grub-use-correct-zfs-version
nixos/grub: use the correct ZFS version
2023-12-31 21:33:37 +01:00
github-actions[bot]
a9cb88c7ae
Merge staging-next into staging 2023-12-31 06:01:28 +00:00
Jan Tojnar
80020c7db4 Merge branch 'master' into staging-next
; Conflicts:
;	pkgs/development/lua-modules/generated-packages.nix
;	pkgs/development/lua-modules/overrides.nix
2023-12-31 02:31:32 +01:00
Will Fancher
9cab49c71b
Merge pull request #273921 from SaltyKitkat/oomd
nixos/systemd: update oomd configuration
2023-12-29 18:47:49 -05:00
github-actions[bot]
294b981465
Merge staging-next into staging 2023-12-29 18:01:23 +00:00
github-actions[bot]
f50aae4fb1
Merge master into staging-next 2023-12-29 18:00:57 +00:00
nikstur
3be357b2e7 nixos/binfmt: remove unused stringAfter 2023-12-29 03:41:45 +01:00
Luflosi
c71cb77cd6
nixos/grub: use the correct ZFS version
When `config.boot.zfs.enableUnstable` is set to true, grub was built with the `zfs` package even though the rest of the system uses the `zfsUnstable` package.
The effect of this can only be seen when `zfs` and `zfsUnstable` actually differ (which is not currently the case), for example when overriding one of them locally.
2023-12-29 01:53:27 +01:00
github-actions[bot]
0097df9129
Merge staging-next into staging 2023-12-27 12:01:18 +00:00
github-actions[bot]
04686e4ee3
Merge master into staging-next 2023-12-27 12:00:55 +00:00
nikstur
c9569af3e0
Merge pull request #271326 from philiptaron/shutdown.target
treewide: depend on `shutdown.target` if `DefaultDependencies=no` in almost every case
2023-12-27 08:33:26 +01:00
Florian Klink
011e924109
Merge pull request #239201 from nesteroff/fix-timesync
systemd: disable NSCD when DNSSEC validation is disabled in timesyncd
2023-12-20 22:22:52 +02:00
github-actions[bot]
a1cd7ca146
Merge master into staging-next 2023-12-20 18:00:56 +00:00
Maciej Krüger
ff680a4c39
Merge pull request #207717 from jpathy/patch-2 2023-12-20 13:52:03 +01:00
github-actions[bot]
176c80219d
Merge master into staging-next 2023-12-20 12:00:53 +00:00
Yuri Nesterov
6008246790 systemd: disable NSCD when DNSSEC validation is disabled in timesyncd
When a system has a wrong date and time timesyncd is unable to synchronize it
because DNSSEC doesn't work. In order to break this chicken and egg problem
systemd-timesync disables DNSSEC validation by setting
SYSTEMD_NSS_RESOLVE_VALIDATE=0 in the unit file. However, it doesn't work in
NixOS because it uses NSCD. This patch disables NSCD in systemd-timesyncd when
SYSTEMD_NSS_RESOLVE_VALIDATE is set to 0 so that it uses NSS libraries
directly. In order for it to be able to find the libnss_resolve.so.2 library
this patch adds the systemd directory in the nix store to the LD_LIBRARY_PATH.
2023-12-20 13:21:43 +02:00
Florian Klink
c28f238f5a
Merge pull request #272946 from benaryorg/resolved_no_fallback
nixos/resolved: Allow upstream fallback override
2023-12-20 12:55:44 +02:00
github-actions[bot]
782f18b6fe
Merge staging-next into staging 2023-12-19 12:01:35 +00:00
Florian Klink
5a57cde110 nixos/systemd/initrd: add systemd-makefs unconditionally
As discussed in
https://github.com/NixOS/nixpkgs/issues/274310#issuecomment-1861842634,
the size increase is negligible, and this might be triggered via fstab
options or the cmdline too.

systemd-growfs is an online operation, so it's taken care of in stage 2.

Fixes https://github.com/NixOS/nixpkgs/issues/274310.
2023-12-19 08:38:03 +02:00
github-actions[bot]
5374345f82
Merge staging-next into staging 2023-12-19 00:02:47 +00:00
Sandro Jäckel
8c58a7cb4b
nixos/luksroot: add final newline to /etc/crypttab 2023-12-18 02:16:08 +01:00
jpathy
0225a786e5
nixos/networkd: allow IPv6LinkLocalAddressGenerationMode in networkConfig
Fixes: #199407 .
2023-12-17 19:39:59 +01:00
benaryorg
57846d0cae
nixos/resolved: Allow upstream fallback override
The previous code did not apply any changes to the upstream defaults on being presented with an empty list.
This changes the code to use the above behaviour on a `null` value while an empty list is passed through as normal which yields a systemd configuration line with empty value which resets it to an empty value.

Signed-off-by: benaryorg <binary@benary.org>
2023-12-15 13:07:05 +00:00
SaltyKitkat
679a417a7a Declare removed option with mkRemovedOptionModule 2023-12-13 16:43:34 +08:00
SaltyKitkat
b2d6b30648 update oomd.nix
due to 7665e1796f
and 806c95e1c7
2023-12-13 16:35:39 +08:00
Ben Wolsieffer
a514d8c148 systemd-stage-1: allow non-existent /lib/firmware
Since 1557027, makeModulesClosure doesn't create a lib/firmware
directory if there is no firmware in the initramfs. If this happens,
systemd-stage-1 fails to build.

/lib only contains /lib/modules and /lib/firmware, both of while are
from modulesClosure. Therefore, we can just add the entirety of
${modulesClosure}/lib to the initramfs to allow for the possibility that
lib/firmware doesn't exist. This also brings systemd-stage-1 in line
with the traditional stage-1.
2023-12-11 21:00:08 -05:00
Raito Bezarius
eecfbe397a nixos/(tests/)journald-(remote|upload|gateway): add raitobezarius as a maintainer 2023-12-09 13:57:08 +01:00