From 5da25f9301751108d30562b4e86561a36f3cebcf Mon Sep 17 00:00:00 2001 From: Will Fancher Date: Thu, 25 Sep 2025 18:27:54 -0400 Subject: [PATCH] systemd: Patch journald's Audit setting https://github.com/systemd/systemd/pull/39069 --- nixos/modules/system/boot/systemd/journald.nix | 7 +++++-- pkgs/os-specific/linux/systemd/default.nix | 6 ++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/nixos/modules/system/boot/systemd/journald.nix b/nixos/modules/system/boot/systemd/journald.nix index 4d2ca7f11f21..279da8f47c0b 100644 --- a/nixos/modules/system/boot/systemd/journald.nix +++ b/nixos/modules/system/boot/systemd/journald.nix @@ -79,8 +79,11 @@ in }; services.journald.audit = lib.mkOption { - default = null; - type = lib.types.nullOr lib.types.bool; + default = "keep"; + type = lib.types.oneOf [ + lib.types.bool + (lib.types.enum [ "keep" ]) + ]; description = '' If enabled systemd-journald will turn on auditing on start-up. If disabled it will turn it off. If unset it will neither enable nor disable it, leaving the previous state unchanged. diff --git a/pkgs/os-specific/linux/systemd/default.nix b/pkgs/os-specific/linux/systemd/default.nix index 07fe2194d044..72f9de346231 100644 --- a/pkgs/os-specific/linux/systemd/default.nix +++ b/pkgs/os-specific/linux/systemd/default.nix @@ -230,6 +230,12 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-DO6q17mE2U8iLezMYt4PX5Ror20N1gCrUbXeQmrW1is="; }) + # https://github.com/systemd/systemd/pull/39069 + (fetchpatch { + url = "https://github.com/systemd/systemd/commit/b5fdfedf729712b9824a5cb457a07d5699d2946c.patch"; + hash = "sha256-0SvAn9Dl4z80PRIvDbIVIjKp5DsT/IUoHa5IiH1HHFY="; + }) + ./0001-Start-device-units-for-uninitialised-encrypted-devic.patch ./0002-Don-t-try-to-unmount-nix-or-nix-store.patch ./0003-Fix-NixOS-containers.patch