nixos/vdr: create video directory automatically
This commit is contained in:
parent
dd3f755cf4
commit
45986ec587
@ -25,7 +25,7 @@ in {
|
|||||||
videoDir = mkOption {
|
videoDir = mkOption {
|
||||||
type = types.path;
|
type = types.path;
|
||||||
default = "/srv/vdr/video";
|
default = "/srv/vdr/video";
|
||||||
description = "Recording directory (must exist)";
|
description = "Recording directory";
|
||||||
};
|
};
|
||||||
|
|
||||||
extraArguments = mkOption {
|
extraArguments = mkOption {
|
||||||
@ -39,6 +39,10 @@ in {
|
|||||||
###### implementation
|
###### implementation
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
systemd.tmpfiles.rules = [
|
||||||
|
"d ${cfg.videoDir} 0755 vdr vdr 0"
|
||||||
|
"Z ${cfg.videoDir} - vdr vdr -"
|
||||||
|
];
|
||||||
|
|
||||||
systemd.services.vdr = {
|
systemd.services.vdr = {
|
||||||
description = "VDR";
|
description = "VDR";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user