1
0
mirror of https://github.com/kmein/niveum synced 2026-03-21 20:31:07 +01:00

feat: tmpfiles.d helper function

This commit is contained in:
2021-03-23 21:00:21 +01:00
parent e3f3e4045a
commit b8967c8e5c
3 changed files with 18 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
{ lib, pkgs, config, ... }:
let
inherit (import <niveum/lib>) nixpkgs-unstable;
inherit (import <niveum/lib>) nixpkgs-unstable tmpfilesConfig;
radioStore = "/var/lib/radio";
htgenPort = 8080;
meddl = { streamPort = 8000; mpdPort = 6600; };
@@ -40,7 +40,13 @@ in
];
systemd.tmpfiles.rules = [
"d '${radioStore}' 0755 ${config.users.extraUsers.radio.name} - 1d -"
(tmpfilesConfig {
type = "d";
path = radioStore;
mode = "0755";
user = config.users.extraUsers.radio.name;
age = "1d";
})
];
users.extraUsers.radio.isSystemUser = true;