0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-17 07:30:21 +03:00
Commit graph

2859 commits

Author SHA1 Message Date
piegames
f6ea57fd16 treewide: Fix incorrect string indentations
(cherry picked from commit dd7d5339f7)
2025-01-11 17:29:21 +01:00
Gaétan Lepage
3d65a7bc96
[Backport release-24.11] doc: Add warning for configuration file copy in flake systems (#369371) 2024-12-31 09:25:52 +01:00
Will Fancher
5f23df2c3c nixos/plymouth: Respect plymouth.enable=0 in scripted stage 1
Removing the splash param only causes plymouth to display console
output by default; it still runs. Systemd stage 1 respects this flag
due to unit conditions preventing plymouth from even running. So this
brings parity to scripted stage 1.

(cherry picked from commit 629c936fd2)
2024-12-30 18:33:53 +00:00
Lucy
cfb79620d8 doc: Add warning for configuration file copy in flake systems
(cherry picked from commit 8a1561bba6)
2024-12-30 12:01:08 +00:00
Franz Pletz
5bacfe77ac nixos/networkd: add NetLabel & NFTSet options
(cherry picked from commit 18a943798a)
2024-12-26 03:15:41 +00:00
Logan Attwood
721e05ffb2 nixos/networkd: expose RapidCommit in DHCPv4 network unit section
Disabling this option is required to obtain a DHCPv4 lease from
some old/misconfigured DHCP servers. This was already exposed for
DHCPv6.

(cherry picked from commit 6c324710e3)
2024-12-18 16:06:04 +00:00
phaer
4b72061083 system/activation: mention deps attr in activationScripts example
As it helps making deps easier to discover - as we don't currently
render submodule options in the module correctly - and is arguably
more technical correct: When using nixos-install to install nixos
into a chroot in i.e. /mnt, there's no gurantee that /mnt/dev exists
before the specialfs phase ran.

(cherry picked from commit df8e6f7487)
2024-12-11 18:01:49 +00:00
Silvan Mosberger
d9d87c5196 treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build https://github.com/infinisil/treewide-nixpkgs-reformat-script/archive/a08b3a4d199c6124ac5b36a889d9099b4383463f.tar.gz \
      --argstr baseRev 0128fbb0a5
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:29:24 +01:00
Jeff Huffman
8afc2f8220 nixos/activation: prevent error during NIXOS_LUSTRATE install
(cherry picked from commit 898c9e3c91)
2024-12-01 17:16:50 +00:00
Franz Pletz
10c7a88e18 nixos/networkd: fix eval
Broken by #330662.

(cherry picked from commit 18cf9ad14b)
2024-11-30 06:11:50 +00:00
Franz Pletz
4ab5e28e7a
[Backport release-24.11] nixos/networkd: add dhcpServerConfig.PersistLeases option (#360311) 2024-11-30 06:54:07 +01:00
Matt Perlman
8b4d73ad4c nixos/networkd: add dhcpServerConfig.PersistLeases option
PersistLeases was added to networkd version 256 (https://www.freedesktop.org/software/systemd/man/latest/systemd.network.html#PersistLeases=)

(cherry picked from commit 42ac7b2428)
2024-11-30 05:47:18 +00:00
Nick Cao
701eec61c0 nixos/networkd: add L3MasterDevice option to [RoutingPolicyRule] section
(cherry picked from commit ee051d65f3)
2024-11-30 05:45:20 +00:00
Nick Cao
19fd8f85ee nixos/networkd add IPv4ProxyARPPrivateVLAN option to [Network] section
(cherry picked from commit 38d02e4ecd)
2024-11-30 05:45:20 +00:00
Nick Cao
f14b9ae439 nixos/networkd: add IPv6RetransmissionTimeSec option to [Network] section
(cherry picked from commit 402699d00e)
2024-11-30 05:45:20 +00:00
Peder Bergebakken Sundt
04c506083c nixos/binfmt: add option addEmulatedSystemsToNixSandbox
(cherry picked from commit bbb6e83f51)
2024-11-26 15:36:11 +00:00
Jared Baur
d08c1b677f nixos/activation: Add pre-switch checks
Add an option for shell script fragments that are ran before switching
to a new NixOS system configuration (pre installation of bootloader or
system activation). Also add a new subcommand for
switch-to-configuration called "check" that will cause the program to
always exit after checks are ran.

(cherry picked from commit 6e192c4489)
2024-11-23 01:33:43 +00:00
Sandro
6a2ae59456 nixos/luksroot: make it harder to accidentially break cryptsetup
(cherry picked from commit b861831405)
2024-11-21 17:39:21 +00:00
Maximilian Bosch
63e1dc6ace nixos/networkd: warn about naively replacing IPForward
See https://github.com/systemd/systemd/issues/33414.

The way this was phrased sounded like a dumb search/replace operation to
me. This resulted in random parts of my routing being broken (forward
from if X -> Y being fine, but the opposite direction being broken).

This change makes it explicit that it's a little more complicated and
you should really consult the docs before making that change.

(cherry picked from commit 06f50f4adf)
2024-11-19 04:11:16 +00:00
Will Fancher
b798b0d694 nixos/systemd-stage-1: nixos-find-nixos-closure before initrd.target
Without this, boot could proceed to the initrd cleanup step before the
closure was found, killing the service and breaking boot.

(cherry picked from commit af8279fe38)
2024-11-19 03:33:43 +00:00
Wolfgang Walther
a2b914e6e3 nixos: remove boot.loader.raspberryPi
This has been announced for 24.11 in #241534, so let's follow through.

(cherry picked from commit 8ca24a7a2b)
2024-11-17 11:50:01 +00:00
Will Fancher
6cfd95fc8c nixos/systemd-stage-1: Order nixos activation after initrd-switch-root.target
Now it's placed between initrd-switch-root.target and
initrd-switch-root.service, meaning it is truly the last thing to
happen before switch-root, as it should be.
2024-11-11 05:52:18 -05:00
Will Fancher
f065a81ab4 nixos/systemd-stage-1: Use chroot-realpath 2024-11-11 05:52:18 -05:00
Sandro
38ea21bd5d
Don't run hwclock if /etc/ is not writable (#353320) 2024-11-06 18:25:41 +01:00
nikstur
0c02b3076c
nixos/etc-overlay: clean up temporary directories (#339802) 2024-11-05 17:13:27 +01:00
Aleksana
81dacf0c91
nixos/systemd: fix enableStrictShellChecks description (#348513) 2024-11-05 23:03:19 +08:00
Will Fancher
5d9ac94606 nixos/activation-script: Make installBootLoader default a script
Fixes #344535
2024-11-04 04:12:52 -05:00
Samuel Tardieu
114ef67cbb Don't run hwclock if /etc/ is not writable 2024-11-03 10:42:21 +01:00
Will Fancher
37ee6ba681 Revert "NixOS apply script"
Reverts #344407

This has broken nixos-rebuild switch so that it no longer updates the profile, which has bad consequences including not updating the systemd-boot menu with new generations.
2024-11-01 20:18:09 -04:00
Christian Kögler
209e69f969
networkd: add missing option SendHostname and Hostname for dhcpV6Config (#348306) 2024-11-01 21:49:04 +01:00
Aleksana
2a3dc3d608
nixos/unl0kr: fix runaway example (#352516) 2024-10-31 16:06:36 +08:00
Sandro
61ee09bc5f
nixos/unl0kr: fix runaway example
We intend with 2 spaces
2024-10-31 02:52:33 +01:00
Yureka
0f216e2578 tree-wide: switch initrd generators back to gnu cpio
Originally, we switched to bsdtar from libarchive to solve a reproducibility issue related to hardlinks

As of gnu cpio 2.14 the --ignore-dirnlink option is introduced and now included in --reproducible, which solves this issue

By switching back, we are in turn solving an issue in libarchive >=3.7.5 erroring out with "Error reading archive -: (null)"

Change-Id: Ib6140d599b6547d8e941b0251ce996e303c41fa6
2024-10-31 01:21:59 +01:00
Robert Hensing
514ea18006 nixos: Update s-t-c and apply help text 2024-10-30 00:23:37 +01:00
Robert Hensing
7902cea1de nixos: Update documentation to refer to bin/apply 2024-10-30 00:21:21 +01:00
Robert Hensing
6427500989 nixos/toplevel: Add bin/apply 2024-10-30 00:21:20 +01:00
Emily
7f753fb746
nixos/systemd: Enable systemd-machine-id-commit.service (#351151) 2024-10-26 15:56:09 +01:00
Frédéric Christ
8f4b41cfd4 nixos/systemd: Enable systemd-machine-id-commit.service
Prior to this contribution, every boot with a default configuration was
considered `ConditionFirstBoot=true` by systemd, since /etc/machine-id
was not commited to disk.

This also extends the systemd with a check for subsequent boots not
being considered first boots.
2024-10-25 14:03:15 +02:00
Jared Baur
9bbef50e24
nixos/switchable-system: add evaluation warning when using perl stc 2024-10-24 08:50:51 -07:00
Jared Baur
81f92fbc29
nixos/switchable-system: nixfmt 2024-10-24 06:22:58 -07:00
K900
c42028339a nixos/systemd-boot: fix substituteAll usage
Missed this one :(
2024-10-20 21:45:57 +03:00
Will Fancher
594ac9011f
nixos/systemd-initrd: add missing kmod-blacklist src (#348505) 2024-10-17 15:46:51 -04:00
Paul Meyer
71c64f8ecc initrd: drop effectless modification of kmod-blacklist
The perl snippet as been added years ago. I assume the intention was to
remove the `## file: iwlwifi.conf` section up to the next `## file:`,
but as there is no file following, the snippet currently does nothing.
We should be fine to remove it.

Signed-off-by: Paul Meyer <49727155+katexochen@users.noreply.github.com>
2024-10-17 16:23:01 +02:00
r-vdp
0f786baf5d
etc: remove unneeded temporary directions after putting in place the new etc 2024-10-16 22:22:58 +02:00
r-vdp
a2d4cea96e
etc: rename the temporary dirs so that they are recognisable
This makes it a lot easier to understand which dir is which
2024-10-16 22:22:58 +02:00
r-vdp
24bf6e9cb8
nixos/etc-overlay: avoid rebuilding the initrd every time the etc contents change
Before this change, the hash of the etc metadata image was included in
the mount unit that's responsible for mounting this metadata image in the
initrd.
And because this metadata image changes with every change to the etc
contents, the initrd would be rebuild every time as well.
This can lead to a lot of rebuilds (especially when revision info is
included in /etc/os-release) and all these initrd archives use up a lot of
space on the ESP.

With this change, we instead include a symlink to the metadata image in the
top-level directory, in the same way as we already do for things like init and
prepare-root, and we deduce the store path from the init= kernel parameter,
in the same way as we already do to find the path to init and prepare-root.

Doing so avoids rebuilding the initrd all the time.
2024-10-16 17:42:58 +02:00
r-vdp
763dc50b08
nixos/systemd-initrd: pull the logic to find the nixos closure into a separate service 2024-10-16 17:42:50 +02:00
Will Fancher
a6e54f566a
nixos/networkd: support systemd-creds in WireGuard (#346964) 2024-10-15 14:31:27 -04:00
Sandro
eafd968bfd
nixos/systemd: fix enableStrictShellChecks description 2024-10-14 13:17:29 +02:00
Paul Meyer
2f6e0c8de3 nixos/systemd-initrd: add missing kmod-blacklist src
Signed-off-by: Paul Meyer <49727155+katexochen@users.noreply.github.com>
2024-10-14 11:34:27 +02:00