Commit graph

2835 commits

Author SHA1 Message Date
K900 f4924fc36c Merge remote-tracking branch 'origin/master' into staging-next 2025-08-16 09:11:21 +03:00
Jared Baur ca9040f22c
nixos/kernel: obtain in-tree kernel modules via the modules output 2025-08-15 20:56:59 -07:00
andre4ik3 216d98ab97
nixos/systemd-initrd: silence various warnings
Silences 2 warning messages that appear when using the systemd initrd:

1. "System tainted (var-run-bad)": occurs because `/var/run` isn't a
   symlink to `/run`. Fixed by making /run and linking /var/run to it.

2. "Failed to make /usr a mountpoint": occurs because ProtectSystem
   defaults to true in the initrd, which makes systemd try to remount
   `/usr` as read-only, which doesn't exist in the initrd. Fixed by
   linking `/usr/bin` and `/usr/sbin` to the initrd bin directories.

Also moves the `/tmp` creation from the initrd module to make-initrd-ng,
to avoid making an unnecessary `/tmp/.keep`, saving a store path and a
few bytes in the initrd image.
2025-08-16 00:28:13 +00:00
Martin Weinelt ab44040de2
Merge remote-tracking branch 'origin/master' into staging-next
Conflicts:
	pkgs/development/python-modules/reflex-hosting-cli/default.nix
	pkgs/development/python-modules/reflex/default.nix
2025-08-16 00:32:32 +02:00
Florian Klink 2804350633
nixos/systemd/{homed,userdbd}: add module options, SSH integration support (#432439) 2025-08-15 22:35:54 +02:00
Colin d538aa4a55
nixos/grub: install memtest and other grub.extraFiles correctly when using mirroredBoots (#420861) 2025-08-15 19:01:26 +00:00
andre4ik3 8fdcd28f9d
nixos/systemd/userdbd: add warning for system users >= UID 1000
When a disposition is not set in a user record, systemd determines user
disposition depending on the range the user's UID falls in. For system
users with UIDs above 1000, this will cause them to be incorrectly
identified as "regular" users.

This will cause `userctl` to report the user as a regular user, and more
importantly, `systemd-homed` will not run the first boot user creation
flow, as regular users are already present on the machine (when they are
really system users).

The most common source of high UID system users will undoubtedly be Nix
build users, so the warning provides additional guidance on how to
remove them or adjust their IDs to be within the system range.

The warning is shown only when userdbd/homed is enabled, and the option
to hide the warning is deliberately hidden, to ensure users will have to
read and acknowledge the warning before proceeding, as otherwise users
could end up deploying an OS with no users and no way of creating one
due to the first boot flow being skipped.
2025-08-15 16:17:58 +00:00
andre4ik3 21a816c3ce
nixos/systemd/homed: add module options, SSH integration support 2025-08-15 16:17:51 +00:00
Fiona Behrens c8e3d79271 nixos/boot/kernel: allow kernel without MODULES support
Allow building a systemd initrd with a kernel that does not have
modules support enabled (`CONFIG_MODULES=n`), by removing the
assertion and only include the modulesClosure, kmod and support files
if MODULES is enabled or unset in the kernel.
2025-08-11 13:39:29 +00:00
nikstur e63a403bfb nixos/kernel: don't include append-initrd-secrets when unused 2025-08-10 22:43:48 +02:00
nikstur 9e0ac0c7e6 nixos/kexec: add enable option
It is still enabled by default but now you can actively exclude it if
you don't need it.
2025-08-10 22:43:34 +02:00
nikstur d5ae87bdeb
Revert "nixos: allow more things to be disabled" 2025-08-10 22:22:08 +02:00
nixpkgs-ci[bot] d50fd904cb
Merge master into staging-next 2025-08-10 18:05:04 +00:00
Arian van Putten 1bb040fae8
nixos: allow more things to be disabled (#429695) 2025-08-10 19:49:52 +02:00
Martin Weinelt 98214d19e0
Merge remote-tracking branch 'origin/master' into staging-next
Conflicts:
	pkgs/development/python-modules/django-stubs-ext/default.nix
	pkgs/development/python-modules/django-stubs/default.nix
	pkgs/development/python-modules/python-roborock/default.nix
2025-08-10 14:46:08 +02:00
K900 aadb3e60ec
linux: remove mentions of extraStructuredConfig & throw error (#432497) 2025-08-10 15:16:42 +03:00
Maximilian Bosch dccb264578
linux: remove mentions of extraStructuredConfig & throw error
PR #431115 changed extraStructuredConfig to structuredExtraConfig to
follow the deprecation warning about `extraConfig`. However,
`extraStructuredConfig` was mentioned in several places in the docs that
weren't addressed. Also, using this would silently fail since the code
in question would still accept the old key.

This patch updates the docs accordingly and throws an error if the
code-path is reached and `extraStructuredConfig` is being used.
2025-08-10 14:10:50 +02:00
andre4ik3 d54387fcd0
nixos/systemd/userdbd: add SSH integration support 2025-08-10 05:21:10 +00:00
andre4ik3 07d5f80dcb
nixos/systemd: add NSS module to shadow database 2025-08-10 05:21:00 +00:00
nixpkgs-ci[bot] ca321b05ae
Merge staging-next into staging 2025-08-09 18:05:59 +00:00
Ryan Lahfa bcc20cad16
nixos/network-interfaces: let networkd handle privacy extensions (#431967) 2025-08-09 17:53:39 +02:00
nikstur bb954cddf5 nixos/network-interfaces: let networkd handle privacy extensions
This removes bash from the mandatory system closure.
2025-08-09 00:10:13 +02:00
nixpkgs-ci[bot] 230bb9a8b7
Merge staging-next into staging 2025-08-01 18:06:57 +00:00
Alex Lyon 38ee02a873 nixos/limine: fix installation when using initrd secrets 2025-08-01 21:59:49 +05:30
nikstur cc20f14ae4 nixos/kexec: add enable option
It is still enabled by default but now you can actively exclude it if
you don't need it.
2025-08-01 14:16:48 +02:00
nikstur 400882d409 nixos/kernel: don't include append-initrd-secrets when unused 2025-07-31 20:42:36 +02:00
nixpkgs-ci[bot] 0b79387651
Merge staging-next into staging 2025-07-30 12:11:23 +00:00
Will Fancher 0a53886700
nixos/{tmpfiles, wrappers}: explicitly set RestrictSUIDSGID false (#426882) 2025-07-30 04:31:21 -04:00
nixpkgs-ci[bot] 44dfdaf4d6
Merge staging-next into staging 2025-07-29 00:20:45 +00:00
Grimmauld fad6dbb9e6
nixos/systemd: remove enableCgroupAccounting option 2025-07-28 11:26:44 +02:00
Grimmauld 231c142766
nixos/systemd: remove obsolete DefaultCPUAccounting option
This option is made uncondiotional in systemd 258 [1].
Earlier, it defaulted to true on kernels newer than 4.15,
which applies to all supported nixos kernels.
This means removing the option does not change behavior.

[1] 29da53dde3
2025-07-28 11:26:37 +02:00
Grimmauld f47b100763
nixos/systemd: remove obsolete DefaultBlockIOAccounting option
This option is now being ignored by systemd,
so we do not need to explicitly define it.
2025-07-28 11:26:34 +02:00
Grimmauld 265152f770
nixos/systemd: explicitly set systemd.settings.Manager.Default*Accounting 2025-07-28 11:26:30 +02:00
Grimmauld 9c429f004d
nixos/systemd: remove obsolete definition for DefaultLimitCORE
The limit was introduced in 2016 in 840f3230a2,
and broken iin 2019 in bafc256915. Since then,
it is the exact same as systemd itself sets as default.
2025-07-28 11:26:27 +02:00
Grimmauld 69e833f187
nixos/systemd: set DefaultLimitCORE in systemd.settings.Manager explicitly 2025-07-28 11:26:24 +02:00
Grimmauld 62acc59148
nixos/systemd: move systemd.watchdog.* to systemd.settings.Manager 2025-07-28 11:26:21 +02:00
Grimmauld 493f1339b0
nixos/systemd: move systemd.watchdog.* to systemd.settings.Manager 2025-07-28 11:26:08 +02:00
Grimmauld 4d3ab0e8d3
nixos/systemd: make systemd.managerEnvironment affect systemd.settings.Manager 2025-07-28 11:24:39 +02:00
Grimmauld 897933fc9e
nixos/systemd: move systemd.managerEnvironment to systemd.settings.Manager.ManagerEnvironment 2025-07-28 11:24:36 +02:00
Grimmauld 5bc2d42ba9
nixos/systemd: make boot.initrd.systemd.managerEnvironment affect boot.initrd.systemd.settings.Manager 2025-07-28 11:24:33 +02:00
Grimmauld 071ce0b44a
nixos/systemd: remove boot.initrd.systemd.extraConfig 2025-07-28 11:24:29 +02:00
Grimmauld 1a846a2fff
nixos/systemd: remove systemd.extraConfig 2025-07-28 11:24:26 +02:00
Grimmauld f0b71eebdc
nixos/systemd: add boot.initrd.systemd.settings.Manager option 2025-07-28 11:24:06 +02:00
Grimmauld ebaf7a33ec
nixos/systemd: add settings.Manager option 2025-07-28 11:23:57 +02:00
nixpkgs-ci[bot] 358926051b
Merge staging-next into staging 2025-07-28 06:08:00 +00:00
Will Fancher 4b3b18a44f
nixos/systemd-boot: refactor json.load() logic for better error message (#421916) 2025-07-27 23:08:42 -04:00
jack dedf852ccd nixos/systemd-boot: refactor json.load() logic for better error message 2025-07-27 13:05:03 +02:00
nixpkgs-ci[bot] e7367619eb
Merge staging-next into staging 2025-07-26 18:05:47 +00:00
Grimmauld fb51cc802d
nixos/systemd: run0: enable setLoginUid, disable pamMount
This brings our `run0` in line with the upstream defaults:
bcc73cafdb/src/run/systemd-run0.in

While working on `auditd`, i noticed differences in how `run0` behaves
in regard to `/proc/$pid/sessionid` and `/proc/$pid/loginuid`. Particularly,
both files were set to `4294967295`, the magic value denoting `unset`.

While the manual page says elevators such as sudo should not set the loginuid,
run0 is a bit of a special case: The unit spawned by it is not child of
the running user session, and as such there is no id to inherit.

`systemd` upstream uses `pam_loginuid`, and for consistency we should too.
Especially because it prevents a whole lot of pain when working with `auditd`.

As to pam mounts:
On nixos we enable those if they are globally enabled. Upstream does not.
Considering the password entered into polkit is usually not the user password
of the account which will own the unit, pam mount will fail for any partition
which requires a password. Thus it makes sense to also disable pam mounts
for our run0, it prevents unnecessary unexpected pain.
2025-07-25 23:49:59 +02:00
Wolfgang Walther 90604d95bc
Merge branch 'staging-next' into staging 2025-07-24 14:33:09 +02:00
Wolfgang Walther 5a0711127c
treewide: run nixfmt 1.0.0 2025-07-24 13:55:40 +02:00
Wolfgang Walther 62fe016519
treewide: run treefmt with mdcr/nixfmt 2025-07-24 13:52:31 +02:00
Grimmauld 248c463f69
nixos/tmpfiles: explicitly set RestrictSUIDSGID = false
This ensures the tmpfiles resetup service has permissions
to create suid/sgid files, even if `DefaultRestrictSUIDSGID`
is set in system.conf. This is required, as tmpfiles
are used to e.g. set file permissions on the journal
directory.`DefaultRestrictSUIDSGID` is a new feature
coming in systemd 258 [1].

[1] https://github.com/systemd/systemd/pull/38126
2025-07-20 12:40:26 +02:00
nixpkgs-ci[bot] 0ac23e27dd
Merge staging-next into staging 2025-07-18 18:06:01 +00:00
nikstur 3fd41447c7
nixos/systemd/repart: add extraArgs option and Encrypt=tpm2 test (#422511) 2025-07-18 16:52:18 +02:00
nixpkgs-ci[bot] abbe5cd65f
Merge staging-next into staging 2025-07-18 00:18:34 +00:00
Franz Pletz 71064c4808
nixos/systemd: fix run0 failing to run commands (#419588) 2025-07-17 22:18:10 +02:00
Florian Klink 27752d2b39
systemd: add sysupdated (#424101) 2025-07-17 02:04:13 +02:00
Jared Baur 996cc69171
nixos/sysupdate: add jmbaur as maintainer 2025-07-15 09:09:36 -07:00
Jared Baur 7b981efa88
nixos/sysupdate: add support for sysupdated/updatectl 2025-07-15 09:09:32 -07:00
sanana 6baed48380 limine-install: fix profile enumeration
Fixes #425158.
2025-07-15 13:49:05 +05:30
Jared Baur 45a71d67a7
nixos/sysupdate: add assertion for systemd built with sysupdate support 2025-07-11 14:07:01 -07:00
phaer dd88db29ed modules/systemd-oomd: add After=systemd-sysusers.service
Before this change, systemd-oomd startup was flaky at least with
either systemd-sysusers or userborn enabled. It would restart several
times until users were provisioned, so that it finally succeeded.

An alternative would be to use a DynamicUser which was my first
approach, before I discovered that upstream added the after statement
in Dec 2024[1]. DynamicUsers could have further
implications (sandboxing, etc), so we follow upstream here.

It's not clear to me we why Upstreams "After=systemd-sysusers.service"
doesn't show up on nixos-unstable systems (systemd v257.6).

Userborn is covered, as its unit is aliased to systemd-sysusers.service.

The following test succeeded after this change on x86_64-linux:

  nix-build -A nixosTests.systemd-oomd

[1]: 36dd429680
2025-07-11 15:13:25 +02:00
Florian Klink e47cbf3942 nixos/systemd/repart: add extraArgs option
There's lots of options regarding dm-crypt, dm-verity and TPMs.
Creating individual NixOS options for all of them would be infeasible.
2025-07-04 23:15:23 +03:00
Sandro Jäckel 5e4801914b
nixos/stage-1: fix option path in message 2025-07-03 17:54:49 +02:00
Shelvacu 8f0f76a32c nixos/grub: install memtest and other grub.extraFiles correctly when using mirroredBoots 2025-06-28 15:01:00 -07:00
Bogdan-Cristian Tătăroiu 3332613add nixos/systemd-initrd: Fix fsck.xfs failing due to missing sh
When running with a xfs root partition and using systemd for stage 1
initrd, I noticed in journalctl that fsck.xfs always failed to execute.

The issue is that it is trying to use the below sh interpreter:

`#!/nix/store/xy4jjgw87sbgwylm5kn047d9gkbhsr9x-bash-5.2p37/bin/sh -f`

but the file does not exist in the initrd image.

/nix/store/xy4jjgw87sbgwylm5kn047d9gkbhsr9x-bash-5.2p37/bin/**bash**
exists since it gets pulled in by some package, but the rest of the
directory is not being pulled in.

boot/systemd/initrd.nix mentions that xfs_progs references the sh
interpreter and seems to explicitly try to address this by adding
${pkgs.bash}/bin to storePaths, but that's the wrong bash package.

Update the `storePaths` value to pull in `pkgs.bashNonInteractive`
rather than `pkgs.bash`.
2025-06-28 14:50:51 +01:00
Florian Klink 32f7b63557
nixos/systemd-oomd: use the correct name for the top-level user slice (#418480) 2025-06-25 00:06:50 +03:00
Jason Yundt d54262911c nixos/systemd: fix run0 failing to run commands
Fixes #361592.

I was able to test this change by doing the following:

1. Create a file named “test-systemd-run0.nix” that contains this Nix
expression:

    let
      nixpkgs = /path/to/nixpkgs;
      pkgs = import nixpkgs { };
    in
    pkgs.testers.runNixOSTest {
      name = "test-systemd-run0";
      nodes.machine = {
        security.polkit.enable = true;
      };
      testScript = ''
        start_all()
        machine.succeed("run0 env")
      '';
    }

2. Replace “/path/to/nixpkgs” with the actual path to an actual copy of
Nixpkgs.

3. Run the integration test by running this command:

    nix-build <path to test-systemd-run0.nix>
2025-06-24 10:18:56 -04:00
Masum Reza a2b5af4710
limine-install: cleanup, improve type hinting (#416188) 2025-06-23 23:08:45 +05:30
r-vdp c28b3143da
nixos/systemd-oomd: use the correct name for the top-level user slice
`user-.slice` does not seem to exist, and the config we generate for it is
rejected by systemd (see `systemctl status user-.slice`).
I suppose that what was really intended here, was to configure
`user.slice`, which is the one that is documented in `man systemd.special`.

Reported-by: Ian Sollars <Ian.Sollars@brussels.msf.org>
2025-06-20 18:53:16 +02:00
K900 458a0d727d Merge remote-tracking branch 'origin/master' into staging-next 2025-06-16 12:41:22 +03:00
nikstur 50d0a81800 nixos/nix-store-veritysetup: init 2025-06-16 10:28:53 +02:00
K900 c9dd2063b7 Merge remote-tracking branch 'origin/master' into staging-next 2025-06-06 09:28:07 +03:00
Philip Taron 1755d9399b
nixos/networkd: update valid KeepConfiguration values (#395621) 2025-06-05 16:17:48 -07:00
nixpkgs-ci[bot] 1c8c1864d6
Merge master into staging-next 2025-06-03 18:06:20 +00:00
Masum Reza 4c902775b8
nixos/limine: make the install script more resilent (#413390) 2025-06-03 20:40:14 +05:30
nixpkgs-ci[bot] 146a746157
Merge staging-next into staging 2025-05-30 12:07:33 +00:00
nixpkgs-ci[bot] c25ea8ef9b
Merge master into staging-next 2025-05-30 12:06:47 +00:00
Josh Hoffer 57c6e3bbe4 nixos/stage-1.init.sh: only remount bind fsType
We should not remount all filesystem types since not all filesystems
are safe to remount and some (nfs) return errors if remounted with
certain mount options.
2025-05-30 12:13:13 +05:30
Josh Hoffer 07f46bea64 nixos/stage-1.init.sh: remove trailing , from mount options 2025-05-30 12:13:13 +05:30
nixpkgs-ci[bot] aabaf9f281
Merge staging-next into staging 2025-05-29 18:06:18 +00:00
nixpkgs-ci[bot] bc2e6e0ae4
Merge master into staging-next 2025-05-29 18:05:35 +00:00
Florian Klink 9dd801dea7
nixos/systemd-initrd: honor the enable option in contents (#411800) 2025-05-29 18:06:12 +03:00
nixpkgs-ci[bot] 97fff3a232
Merge staging-next into staging 2025-05-29 12:07:37 +00:00
nixpkgs-ci[bot] 96ecef502b
Merge master into staging-next 2025-05-29 12:06:54 +00:00
Florian Klink 2d03d70e9d
nixos/systemd-stage-1: follow systemd /run propagation (#405687) 2025-05-29 12:21:50 +03:00
Fiona Behrens 99da5ec2bc nixos/systemd-initrd: honor the enable option in contents
The enable attribute of `boot.initrd.systemd.contents.<name>` was
ignored for building initrd storePaths. This resulted in building
derivations for the initrd even if it was disabled.

Found while testing a to build a nixos system with a kernel without
lodable modules[0]

[0]: https://github.com/NixOS/nixpkgs/pull/411792
2025-05-28 17:10:02 +00:00
Peter Marshall 7d36daa76a
nixos/systemd-stage-1: follow systemd /run propagation
We currently bypass systemd's switch-root logic by premounting
/sysroot/run. Make sure to propagate its sub-mounts with the recursive
flag, in accordance with the default switch-root logic.

This is required for creds at /run/credentials to survive the transition
from initrd -> host.
2025-05-28 13:02:39 -04:00
nixpkgs-ci[bot] fe00466a98
Merge staging-next into staging 2025-05-28 12:08:06 +00:00
nixpkgs-ci[bot] 61b02cb4be
Merge master into staging-next 2025-05-28 12:07:03 +00:00
Florian Klink 6be6061a7c
nixos/systemd/networkd: allow passing flow control fields to link (#402587) 2025-05-28 09:39:16 +03:00
nixpkgs-ci[bot] 3f5733a8f9
Merge staging-next into staging 2025-05-26 18:06:16 +00:00
nixpkgs-ci[bot] cc7ffdded8
Merge master into staging-next 2025-05-26 18:05:25 +00:00
Jörg Thalheim 131462b962
emergencyMode, emergencyAccess: cross reference options in docs. (#410418) 2025-05-26 14:12:41 +02:00
nixpkgs-ci[bot] 8afc7d1f62
Merge staging-next into staging 2025-05-26 12:07:27 +00:00
nixpkgs-ci[bot] a5ddfccbf2
Merge master into staging-next 2025-05-26 12:06:38 +00:00
programmerlexi 2c673b6e67
nixos/limine: fix boot entry not being created properly (#410935) 2025-05-26 13:19:36 +05:30
Luj b16c62d24e
nixos/clevis: fix clevis in scripted initrd (#410661) 2025-05-26 09:04:17 +02:00
nixpkgs-ci[bot] 6650fae47a
Merge master into staging-next 2025-05-25 12:06:03 +00:00
Vladimír Čunát 3d7372384d
Merge branch 'master' into staging 2025-05-25 09:51:57 +02:00
Julien Malka 9655143028
nixos/clevis: fix clevis in scripted initrd
Fixes #389750
2025-05-25 01:34:06 +02:00
LuoChen af93b70ddc nixos/boot: add boot.tmp.useZram options 2025-05-24 23:01:41 +08:00
DavHau d5d323a907 emergencyMode, emergencyAccess: cross reference options in docs.
I was confused why I could not get an emergency access console despite setting systemd.emergencyMode=true.

Turns out there is another similar option `boot.initrd.systemd.emergencyAccess` that I should have used.

This is confusing and this change should make it more clear vie the docs of both these options.
2025-05-24 14:01:22 +07:00
nixpkgs-ci[bot] 5c675c14a4
Merge staging-next into staging 2025-05-23 17:49:42 +00:00
nixpkgs-ci[bot] 542c7ef677
Merge master into staging-next 2025-05-23 17:48:46 +00:00
John Titor 88d5e40fcb
limine, nixos/limine, nixosTests.limine: inherit pkgs.limine maintainers
also adds @programmerlexi to limine package maintainers

Signed-off-by: John Titor <50095635+JohnRTitor@users.noreply.github.com>
2025-05-23 15:06:50 +05:30
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
Charlie Moog 5781ef6de9
nixos/systemd/networkd: allow passing flow control fields to link 2025-05-03 18:18:30 +00: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