1
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-06-27 03:26:50 +03:00
nixpkgs/nixos/modules/system/boot/systemd
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
..
coredump.nix nixos/*: tag manpage references 2025-01-27 02:47:01 +01:00
dm-verity.nix nixos: add support for dm-verity 2024-09-20 13:03:10 +02:00
fido2.nix nixos/systemd-stage-1: Fix FIDO2 udev rules 2025-01-06 11:41:39 -05:00
homed.nix treewide: format all inactive Nix files 2024-12-10 20:26:33 +01:00
initrd-secrets.nix treewide: format all inactive Nix files 2024-12-10 20:26:33 +01:00
initrd.nix nixos/systemd-initrd: deprecate strip 2025-05-08 19:08:14 -04:00
journald-gateway.nix treewide: format all inactive Nix files 2024-12-10 20:26:33 +01:00
journald-remote.nix treewide: format all inactive Nix files 2024-12-10 20:26:33 +01:00
journald-upload.nix treewide: format all inactive Nix files 2024-12-10 20:26:33 +01:00
journald.nix nixos/systemd: unconditional systemd-journald-audit.socket 2025-05-18 19:58:59 +00:00
logind.nix nixos/logind: add "sleep" option to logindHandlerType 2025-03-10 19:44:27 +01:00
nspawn.nix treewide: format all inactive Nix files 2024-12-10 20:26:33 +01:00
oomd.nix treewide: format all inactive Nix files 2024-12-10 20:26:33 +01:00
repart.nix repart: Enable discard option 2025-04-11 12:46:50 +02:00
shutdown.nix nixos/shutdown: Create /run/initramfs with mode 0700 2025-04-13 12:02:16 -04:00
sysupdate.nix nixos/doc: convert links to manpages 2025-02-21 16:31:09 +01:00
sysusers.nix nixos/sysusers: respect per user .enable 2025-03-20 20:43:00 +00:00
tmpfiles.nix nixos/tmpfiles: properly escape argument option 2025-04-02 13:23:42 +02:00
tpm2.nix nixos/systemd: conditionally leave out some upstream units 2025-03-19 08:14:48 -07:00
user.nix treewide: format all inactive Nix files 2024-12-10 20:26:33 +01:00
userdbd.nix nixos: remove all uses of lib.mdDoc 2024-04-13 10:07:35 -07:00