From 538958bf17b7493e38ccc07d3405f979fd40e4b8 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 3 Sep 2015 11:29:46 +0200 Subject: [PATCH] Create /var/log/journal Fixes #9614. (cherry picked from commit 6ab7e0de2953b5d13f52372258825e90fdea3fd3) --- nixos/modules/system/boot/systemd.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nixos/modules/system/boot/systemd.nix b/nixos/modules/system/boot/systemd.nix index 05369da4f16b3f..4976dfe8eea4b8 100644 --- a/nixos/modules/system/boot/systemd.nix +++ b/nixos/modules/system/boot/systemd.nix @@ -643,6 +643,10 @@ in if ! [ -e /etc/machine-id ]; then ${systemd}/bin/systemd-machine-id-setup fi + + # Keep a persistent journal. Note that systemd-tmpfiles will + # set proper ownership/permissions. + mkdir -m 0700 -p /var/log/journal ''; users.extraUsers.systemd-network.uid = config.ids.uids.systemd-network;