move minidlna to its own module
This commit is contained in:
parent
a6169de898
commit
ebd263189e
@ -65,14 +65,6 @@ in
|
||||
|
||||
systemd.tmpfiles.rules = [ "d /var/www 0755 motiejus users -" ];
|
||||
|
||||
systemd.services.minidlna = {
|
||||
serviceConfig = {
|
||||
ProtectSystem = "strict";
|
||||
ProtectHome = "tmpfs";
|
||||
BindReadOnlyPaths = [ "/home/motiejus/video" ];
|
||||
};
|
||||
};
|
||||
|
||||
services = {
|
||||
pcscd.enable = true;
|
||||
acpid.enable = true;
|
||||
@ -105,16 +97,6 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
minidlna = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
settings = {
|
||||
media_dir = [ "/home/motiejus/video" ];
|
||||
friendly_name = "vno1-oh2";
|
||||
inotify = "yes";
|
||||
};
|
||||
};
|
||||
|
||||
prometheus = {
|
||||
enable = true;
|
||||
port = myData.ports.prometheus;
|
||||
@ -189,12 +171,18 @@ in
|
||||
sshguard.enable = true;
|
||||
gitea.enable = true;
|
||||
hass.enable = true;
|
||||
|
||||
vaultwarden = {
|
||||
enable = true;
|
||||
port = myData.ports.vaultwarden;
|
||||
secretsEnvFile = config.age.secrets.vaultwarden-secrets-env.path;
|
||||
};
|
||||
|
||||
minidlna = {
|
||||
enable = true;
|
||||
paths = [ "/home/motiejus/video" ];
|
||||
};
|
||||
|
||||
grafana = {
|
||||
enable = true;
|
||||
port = myData.ports.grafana;
|
||||
|
@ -12,6 +12,7 @@
|
||||
./headscale
|
||||
./jakstpub
|
||||
./matrix-synapse
|
||||
./minidlna
|
||||
./node_exporter
|
||||
./nsd-acme
|
||||
./photoprism
|
||||
|
33
modules/services/minidlna/default.nix
Normal file
33
modules/services/minidlna/default.nix
Normal file
@ -0,0 +1,33 @@
|
||||
{ config, lib, ... }:
|
||||
let
|
||||
cfg = config.mj.services.minidlna;
|
||||
in
|
||||
{
|
||||
options.mj.services.minidlna = with lib.types; {
|
||||
enable = lib.mkEnableOption "Enable minidlna";
|
||||
paths = lib.mkOption { type = listOf path; };
|
||||
};
|
||||
|
||||
config = {
|
||||
|
||||
services.minidlna = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
settings = {
|
||||
media_dir = cfg.paths;
|
||||
friendly_name = "${config.networking.hostName}.${config.networking.domain}";
|
||||
inotify = "yes";
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services.minidlna = {
|
||||
serviceConfig = {
|
||||
ProtectSystem = "strict";
|
||||
ProtectHome = "tmpfs";
|
||||
BindReadOnlyPaths = cfg.paths;
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user