summary refs log tree commit diff
path: root/nixos/modules/services/hardware/vdr.nix
diff options
context:
space:
mode:
authorJörg Thalheim <joerg@thalheim.io>2018-12-22 15:13:35 +0100
committerJörg Thalheim <joerg@thalheim.io>2018-12-22 15:13:35 +0100
commit45986ec5873c978725ed482dc9a35e215ebb0438 (patch)
tree2f7fe2ead809affb59a483fce17c08334cfe0c27 /nixos/modules/services/hardware/vdr.nix
parentdd3f755cf4e864bbf60613d5ca98d33ffbcbf9e6 (diff)
downloadnixpkgs-45986ec5873c978725ed482dc9a35e215ebb0438.tar
nixpkgs-45986ec5873c978725ed482dc9a35e215ebb0438.tar.gz
nixpkgs-45986ec5873c978725ed482dc9a35e215ebb0438.tar.bz2
nixpkgs-45986ec5873c978725ed482dc9a35e215ebb0438.tar.lz
nixpkgs-45986ec5873c978725ed482dc9a35e215ebb0438.tar.xz
nixpkgs-45986ec5873c978725ed482dc9a35e215ebb0438.tar.zst
nixpkgs-45986ec5873c978725ed482dc9a35e215ebb0438.zip
nixos/vdr: create video directory automatically
Diffstat (limited to 'nixos/modules/services/hardware/vdr.nix')
-rw-r--r--nixos/modules/services/hardware/vdr.nix6
1 files changed, 5 insertions, 1 deletions
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";