nixos/vdr: create video directory automatically

This commit is contained in:
Jörg Thalheim 2018-12-22 15:13:35 +01:00
parent dd3f755cf4
commit 45986ec587
No known key found for this signature in database
GPG Key ID: CA4106B8D7CC79FA

View File

@ -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";