blob: e2fc6d9e8e66caa0a164a87feff43a5af5c3c8b0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
{ pkgs, ... }:
let
mpds = import ./mpdconfig.nix;
pkg = pkgs.office-radio;
in {
systemd.services.office-radio-appsrv = {
after = [ "network.target" ];
description = "Office Radio Appserver";
wantedBy = [ "multi-user.target" ];
serviceConfig = {
ExecStart = "${pkg}/bin/office-radio";
DynamicUser = true;
ProtectSystem = true;
NoNewPrivileges = true;
ProtectKernelTunables = true;
ProtectControlGroups = true;
ProtectKernelModules = true;
RestrictAddressFamilies = "AF_INET AF_INET6 AF_UNIX AF_NETLINK";
RestrictNamespaces = true;
Restart = "always";
};
};
systemd.services.office-radio-stopper = {
after = [ "network.target" ];
description = "Office Radio Script to stop idle streams";
wantedBy = [ "multi-user.target" ];
serviceConfig = {
ExecStart = "${pkg}/bin/stop-idle-streams";
DynamicUser = true;
ProtectSystem = true;
NoNewPrivileges = true;
ProtectKernelTunables = true;
ProtectControlGroups = true;
ProtectKernelModules = true;
RestrictAddressFamilies = "AF_INET AF_INET6 AF_UNIX AF_NETLINK";
RestrictNamespaces = true;
Restart = "always";
};
};
}
|