Commit graph

2626 commits

Author SHA1 Message Date
Morgan Jones
ff7b4ccdff
nixos/stage-2-init: support nosuid/nodev mount options for /nix/store (#406184) 2025-05-22 19:16:54 -07:00
nixpkgs-ci[bot]
c18eaf47ec
Merge master into staging-next 2025-05-22 18:05:39 +00:00
hustlerone
de6905ee37 nixos/limine: tidy up the boot menu 2025-05-22 20:45:00 +05:30
nixpkgs-ci[bot]
0870c6fca2
Merge master into staging-next 2025-05-22 00:16:45 +00:00
Paul Haerle
190ee55caa
systemd-boot: improve error message if no previous systemd boot is fo… (#409073) 2025-05-22 00:54:16 +02:00
nixpkgs-ci[bot]
f71fa930ff
Merge master into staging-next 2025-05-21 18:06:02 +00:00
programmerlexi
95030d7eb3 nixos/limine: don't modify boot order on bootloader update 2025-05-21 23:17:42 +05:30
programmerlexi
36ecfe6216 nixos/limine: add support for secure boot
Signed-off-by: John Titor <50095635+JohnRTitor@users.noreply.github.com>
2025-05-21 21:59:23 +05:30
nixpkgs-ci[bot]
4d9655a56c
Merge master into staging-next 2025-05-21 12:07:14 +00:00
programmerlexi
a094b5d8cc nixos/limine: carefully remove files instead of nuking them 2025-05-21 15:22:45 +05:30
programmerlexi
2c7659b1ff nixos/limine: atomically copy files 2025-05-21 15:22:45 +05:30
nixpkgs-ci[bot]
7ac4ee7b2a
Merge master into staging-next 2025-05-20 18:05:35 +00:00
Jörg Thalheim
b6c1663986 systemd-boot: improve error message if no previous systemd boot is found. 2025-05-20 15:39:07 +02:00
benaryorg
e434130d0b
nixos/systemd: unconditional systemd-journald-audit.socket
Containers did not have *systemd-journald-audit.socket* in *additionalUpstreamSystemUnits*, which meant that the unit was not provided.
However the *wantedBy* was added without any additional check, therefore creating an empty unit with just the *WantedBy* on *boot.isContainer* machines.
This caused `systemd-analyze verify` to fail:

```text
systemd-journald-audit.socket: Unit has no Listen setting (ListenStream=, ListenDatagram=, ListenFIFO=, ...). Refusing.
systemd-journald-audit.socket: Cannot add dependency job, ignoring: Unit systemd-journald-audit.socket has a bad unit file setting.
systemd-journald-audit.socket: Cannot add dependency job, ignoring: Unit systemd-journald-audit.socket has a bad unit file setting.
```

The upstream unit already contains the following, which should make it safe to include regardless:

```ini
[Unit]
ConditionSecurity=audit
ConditionCapability=CAP_AUDIT_READ
```

For reference, this popped up in the context of #[360426](https://redirect.github.com/NixOS/nixpkgs/issues/360426) as well as #[407696](https://redirect.github.com/NixOS/nixpkgs/pull/407696).

Co-authored-by: Bruce Toll <4109762+tollb@users.noreply.github.com>
Signed-off-by: benaryorg <binary@benary.org>
2025-05-18 19:58:59 +00:00
Grimmauld
aa3e5a2738
nixos/stage-2-init: remove 'readOnlyNixStore' option
The `boot.readOnlyNixStore` option can be removed,
now that the more flexible `boot.nixStoreMountOpts` option exists.
2025-05-18 12:08:03 +02:00
Grimmauld
4e440ec124
nixos/stage-2-init: support nosuid/nodev mount options for /nix/store
This is part of security-in-depth.
No suid binaries or devices should ever be in the nix store.
If they are, something is seriously wrong.
Disallowing this from a file system level should be non-breaking.
2025-05-18 12:07:10 +02:00
nixpkgs-ci[bot]
7e279a7b17
Merge master into staging-next 2025-05-18 00:18:27 +00:00
Ramses
c0f89cb69e
nixos/limine: substituteAll -> replaceVarsWith (#406872) 2025-05-17 20:08:31 +02:00
Robert Hensing
3dd811c4b9 lib.types.attrNamesToTrue: unpublish temporarily
Thank you for making this change.
Unfortunately, and I take blame for this, this change to the module
system was not reviewed and approved by the module system maintainers.
I'm supportive of this change, but extending it on the staging-next
branch is not the right place.
This commit is also here to make sure that we don't run into conflicts
or other git trouble with the staging workflow.

Review:
It looks alright, but it didn't have tests yet, and it should be
considered in a broader context where the existence of this type
creates an incentive to be used in cases where the `<attr> = false;`
case is undesirable. I'd like to complement this with an type that
has `<attr> = {};` only.

My apologies for the lack of a timely and clear review. Often we
recommend to define the type outside the module system until
approved. This commit puts us back in that state.

attrNamesToTrue was introduced in 98652f9a90
2025-05-16 11:52:36 +02:00
Winter
b7ea2eaa7d
nixos/kernel: Module inclusion improvements (#375975) 2025-05-16 01:44:53 -04:00
Will Fancher
96fb55514f nixos/stage-1: Add option for allowing missing modules 2025-05-15 00:00:56 -04:00
Will Fancher
028b3e1411 nixos: Use common modulesClosure in scripted and systemd initrd 2025-05-15 00:00:56 -04:00
Will Fancher
98652f9a90 nixos/kernel: Allow controlling modules with attrsets 2025-05-15 00:00:56 -04:00
nat
e51e0da386
nixos/limine: substituteAll -> replaceVarsWith 2025-05-13 23:14:43 +02:00
nixpkgs-ci[bot]
673efed879
Merge master into staging-next 2025-05-11 00:17:35 +00:00
Martin Weinelt
9da9474d63
nixos/boot/tmp: introduce adaptive huge memory pages (#404514) 2025-05-11 01:23:32 +02:00
Florian Klink
180f5a2593
nixos/systemd-initrd: deprecate strip (#404512) 2025-05-10 19:11:16 +03:00
Colin
62cab5dbe8
pkgs/buffybox: 3.2.0-unstable-2025-03-16 -> 3.3.0-unstable-2025-05-06 (#403179) 2025-05-09 02:04:39 +00:00
Gerg-L
98313e2b81
nixos/systemd-initrd: deprecate strip
It only saved ~1MiB of initramfs size, but caused a few issues
like unloadable kernel modules.
2025-05-08 19:08:14 -04:00
hustlerone
90ff6dc49e nixos/unl0kr: fix touchpads 2025-05-09 00:29:43 +02:00
PAEPCKE, Michael
b8eb81e873
nixos/boot/tmp: introduce adaptive huge memory pages 2025-05-05 22:52:02 +00:00
Yureka
3b42616f4b nixos/initrd-ssh: include sshd-auth binary in initrd 2025-05-05 17:23:47 +02:00
Sandro
55e8dc37a3
nixos/luksroot: remove useless $new_k_luks (#115832) 2025-04-30 16:51:33 +02:00
nikstur
bf2bc08b37
repart: Enable discard option (#397906) 2025-04-28 13:34:32 +02:00
Paul Haerle
86a1af8a7b
nixos/systemd: clarify what enableStrictShellChecks checks (#401460) 2025-04-27 14:15:15 +02:00
Scott Edlund
02555cd0bd nixos/systemd: clarify what enableStrictShellChecks checks
the specifics of this option are in the release notes, but bring
them into the documentation.
2025-04-26 01:46:12 +08:00
Raito Bezarius
139bfb5b5e nixos/system/activation/bootspec: generalize the bootspec tooling package
After RFC-0125 implementation, Determinate Systems was pinged multiple
times to transfer the repository ownership of the tooling to a
vendor-neutral repository.

Unfortunately, this never manifested. Additionally, the leadership of
the NixOS project was too dysfunctional to deal with this sort of
problem. It might even still be the case up to this day.

Nonetheless, nixpkgs is about enabling end users to enact their own
policies. It would be better to live in a world where there is one
obvious choice of bootspec tooling, in the meantime, we can live in a
world where people can choose their bootspec tooling.

The Lix forge possess one fork of the Bootspec tooling:
https://git.lix.systems/lix-community/bootspec which will live its own
life from now on.

Change-Id: I00c4dd64e00b4c24f6641472902e7df60ed13b55
Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
2025-04-24 18:22:02 +02:00
Nico Felbinger
e0d1b49a46
chore: move meta option to top level in many modules 2025-04-19 18:27:48 +02:00
Martin Weinelt
fbf76bf72b
make-initrd-ng: Restore stripped file permissions (#398396) 2025-04-13 18:11:19 +02:00
Will Fancher
c9ea864d6f nixos/shutdown: Create /run/initramfs with mode 0700 2025-04-13 12:02:16 -04:00
Markus Sütter
c6476ca119 repart: Enable discard option
systemd-repart can be configured to not automatically issue BLKDISCARD commands
to the underlying hardware.

This PR exposes this option in the repart module.
2025-04-11 12:46:50 +02:00
Hugo Lageneste
1599c37a6b nixos/luksroot: remove useless $new_k_luks
Remove the variable new_k_luks used only once in the code.
2025-04-04 23:39:29 +02:00
nixpkgs-ci[bot]
d05ee1c1cb
Merge staging-next into staging 2025-04-02 16:38:11 +00:00
Silvan Mosberger
e52d633a63 Merge remote-tracking branch 'upstream/staging-next' into staging 2025-04-02 18:30:54 +02:00
Mikael Voss
045fbc389f
nixos/tmpfiles: properly escape argument option
The systemd.tmpfiles.settings.<name>.<path>.<type>.argument option may
contain arbitrary strings. This could allow intentional or unintentional
introduction of new configuration lines.

The argument field cannot be quoted, C‐style \xNN escape sequences are
however permitted. By escaping whitespace and newline characters, the
issue can be mitigated.
2025-04-02 13:23:42 +02:00
Silvan Mosberger
374e6bcc40 treewide: Format all Nix files
Format all Nix files using the officially approved formatter,
making the CI check introduced in the previous commit succeed:

  nix-build ci -A fmt.check

This is the next step of the of the [implementation](https://github.com/NixOS/nixfmt/issues/153)
of the accepted [RFC 166](https://github.com/NixOS/rfcs/pull/166).

This commit will lead to merge conflicts for a number of PRs,
up to an estimated ~1100 (~33%) among the PRs with activity in the past 2
months, but that should be lower than what it would be without the previous
[partial treewide format](https://github.com/NixOS/nixpkgs/pull/322537).

Merge conflicts caused by this commit can now automatically be resolved while rebasing using the
[auto-rebase script](8616af08d9/maintainers/scripts/auto-rebase).

If you run into any problems regarding any of this, please reach out to the
[formatting team](https://nixos.org/community/teams/formatting/) by
pinging @NixOS/nix-formatting.
2025-04-01 20:10:43 +02:00
nixpkgs-ci[bot]
d5f30d9d8a
Merge staging-next into staging 2025-03-24 12:07:10 +00:00
Luj
e21904681e
nixos/systemd-boot: strip newline from machine-id (#375298) 2025-03-24 11:06:53 +01:00
nixpkgs-ci[bot]
a9379697ea
Merge staging-next into staging 2025-03-22 18:05:14 +00:00
Weijia Wang
7bce6fbf11
nixos/limine: Fix reading generations for primary profile and specialisations (#391210) 2025-03-22 18:23:02 +01:00