From 45986ec5873c978725ed482dc9a35e215ebb0438 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sat, 22 Dec 2018 15:13:35 +0100 Subject: [PATCH] nixos/vdr: create video directory automatically --- nixos/modules/services/hardware/vdr.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/nixos/modules/services/hardware/vdr.nix b/nixos/modules/services/hardware/vdr.nix index 39a656ec7e4..b0ecb944b5e 100644 --- a/nixos/modules/services/hardware/vdr.nix +++ b/nixos/modules/services/hardware/vdr.nix @@ -25,7 +25,7 @@ in { videoDir = mkOption { type = types.path; default = "/srv/vdr/video"; - description = "Recording directory (must exist)"; + description = "Recording directory"; }; extraArguments = mkOption { @@ -39,6 +39,10 @@ in { ###### implementation config = mkIf cfg.enable { + systemd.tmpfiles.rules = [ + "d ${cfg.videoDir} 0755 vdr vdr 0" + "Z ${cfg.videoDir} - vdr vdr -" + ]; systemd.services.vdr = { description = "VDR";