summaryrefslogtreecommitdiffstats
path: root/nixos/modules/services/video
diff options
context:
space:
mode:
authorh7x4 <h7x4@nani.wtf>2024-01-11 22:10:18 +0100
committerh7x4 <h7x4@nani.wtf>2024-01-24 05:13:17 +0100
commitf5d513c5738e630bb053f897b789801bff078ec9 (patch)
tree03fa417b85608c572de4eec6f87a4bbd8ef82545 /nixos/modules/services/video
parentbfc38653369649ad316825bc21005c5105599ec2 (diff)
treewide: use new tmpfiles api
Diffstat (limited to 'nixos/modules/services/video')
-rw-r--r--nixos/modules/services/video/epgstation/default.nix30
-rw-r--r--nixos/modules/services/video/mirakurun.nix7
2 files changed, 23 insertions, 14 deletions
diff --git a/nixos/modules/services/video/epgstation/default.nix b/nixos/modules/services/video/epgstation/default.nix
index a7468e7cc2b6..1b3258c3df8e 100644
--- a/nixos/modules/services/video/epgstation/default.nix
+++ b/nixos/modules/services/video/epgstation/default.nix
@@ -309,17 +309,25 @@ in
(lib.mkIf cfg.usePreconfiguredStreaming streamingConfig)
];
- systemd.tmpfiles.rules = [
- "d '/var/lib/epgstation/key' - ${username} ${groupname} - -"
- "d '/var/lib/epgstation/streamfiles' - ${username} ${groupname} - -"
- "d '/var/lib/epgstation/drop' - ${username} ${groupname} - -"
- "d '/var/lib/epgstation/recorded' - ${username} ${groupname} - -"
- "d '/var/lib/epgstation/thumbnail' - ${username} ${groupname} - -"
- "d '/var/lib/epgstation/db/subscribers' - ${username} ${groupname} - -"
- "d '/var/lib/epgstation/db/migrations/mysql' - ${username} ${groupname} - -"
- "d '/var/lib/epgstation/db/migrations/postgres' - ${username} ${groupname} - -"
- "d '/var/lib/epgstation/db/migrations/sqlite' - ${username} ${groupname} - -"
- ];
+ systemd.tmpfiles.settings."10-epgstation" =
+ lib.listToAttrs
+ (map (dir: lib.nameValuePair dir {
+ d = {
+ user = username;
+ group = groupname;
+ };
+ })
+ [
+ "/var/lib/epgstation/key"
+ "/var/lib/epgstation/streamfiles"
+ "/var/lib/epgstation/drop"
+ "/var/lib/epgstation/recorded"
+ "/var/lib/epgstation/thumbnail"
+ "/var/lib/epgstation/db/subscribers"
+ "/var/lib/epgstation/db/migrations/mysql"
+ "/var/lib/epgstation/db/migrations/postgres"
+ "/var/lib/epgstation/db/migrations/sqlite"
+ ]);
systemd.services.epgstation = {
inherit description;
diff --git a/nixos/modules/services/video/mirakurun.nix b/nixos/modules/services/video/mirakurun.nix
index 31f90650ba9a..208b34ab353a 100644
--- a/nixos/modules/services/video/mirakurun.nix
+++ b/nixos/modules/services/video/mirakurun.nix
@@ -165,9 +165,10 @@ in
port = mkIf (cfg.port != null) cfg.port;
};
- systemd.tmpfiles.rules = [
- "d '/etc/mirakurun' - ${username} ${groupname} - -"
- ];
+ systemd.tmpfiles.settings."10-mirakurun"."/etc/mirakurun".d = {
+ user = username;
+ group = groupname;
+ };
systemd.services.mirakurun = {
description = mirakurun.meta.description;