1
0
mirror of https://github.com/kmein/niveum synced 2026-03-16 10:11:08 +01:00

feat(mpd): add mukke

This commit is contained in:
2023-07-13 22:13:22 +02:00
parent bfb7ed3b5a
commit 7a2a6217c4

View File

@@ -7,6 +7,8 @@
firewall = (import ../../lib).firewall lib;
inherit (import ../../lib) tmpfilesConfig;
mukkeMountPoint = "/mnt/mukke";
streams = import ../../lib/streams.nix {
di-fm-key = ""; # TODO lib.strings.fileContents <secrets/di.fm/key>;
};
@@ -25,7 +27,7 @@ in {
devices = {
inherit ((import ../../lib).syncthing.devices) kabsa manakish heym;
};
folders.${config.services.mpd.musicDirectory} = {
folders."${config.services.mpd.musicDirectory}/sync" = {
devices = ["heym" "kabsa" "manakish"];
id = "music";
type = "receiveonly";
@@ -46,6 +48,19 @@ in {
'';
};
fileSystems.${mukkeMountPoint} = {
device = "//mukke.r/public";
fsType = "cifs";
options = [
"guest"
"nofail"
"noauto"
"ro"
"rsize=16777216"
"cache=loose"
];
};
environment.systemPackages = [pkgs.mpc_cli];
networking.firewall = let
@@ -93,6 +108,14 @@ in {
path = "/var/lib/mpd/playlists/all.m3u";
argument = makePlaylist "all" streams;
})
(tmpfilesConfig {
type = "L+";
mode = "0644";
user = "mpd";
group = "mpd";
path = "${config.services.mpd.musicDirectory}/mukke";
argument = mukkeMountPoint;
})
];
services.ympd = {