Skip to content

Commit 952f527

Browse files
committed
mopidy connected to navidrome
1 parent b05480d commit 952f527

3 files changed

Lines changed: 54 additions & 0 deletions

File tree

desktop/configuration/services.nix

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{ pkgs
22
, config
3+
, lib
34
, ...
45
}:
56

@@ -9,8 +10,56 @@
910
owner = "navidrome";
1011
group = "navidrome";
1112
};
13+
age.secrets.mopidy-subidy = {
14+
file = ../../secrets/mopidy-subidy.age;
15+
owner = "codebam";
16+
group = "users";
17+
};
18+
19+
systemd.services.mopidy = {
20+
environment = {
21+
GST_PLUGIN_SYSTEM_PATH_1_0 = lib.makeSearchPathOutput "lib" "lib/gstreamer-1.0" [
22+
pkgs.gst_all_1.gst-plugins-base
23+
pkgs.gst_all_1.gst-plugins-good
24+
pkgs.pipewire
25+
];
26+
PIPEWIRE_RUNTIME_DIR = "/run/user/1000";
27+
PIPEWIRE_REMOTE = "pipewire-0";
28+
};
29+
serviceConfig = {
30+
BindReadOnlyPaths = [ "/run/user/1000" ];
31+
User = lib.mkForce "codebam";
32+
Group = lib.mkForce "users";
33+
};
34+
};
1235

1336
services = {
37+
mopidy = {
38+
enable = true;
39+
extensionPackages = with pkgs; [
40+
mopidy-subidy
41+
mopidy-mpd
42+
gst_all_1.gst-plugins-base
43+
gst_all_1.gst-plugins-good
44+
pipewire
45+
];
46+
settings = {
47+
core = {
48+
restore_state = true;
49+
};
50+
audio = {
51+
output = "pipewiresink";
52+
};
53+
mpd = {
54+
enabled = true;
55+
hostname = "0.0.0.0";
56+
port = 6600;
57+
};
58+
};
59+
extraConfigFiles = [
60+
config.age.secrets.mopidy-subidy.path
61+
];
62+
};
1463
lidarr = {
1564
enable = true;
1665
openFirewall = true;

secrets/mopidy-subidy.age

606 Bytes
Binary file not shown.

secrets/secrets.nix

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,9 @@ in
2121
users.yubikey-5c
2222
users.yubikey-5c-nfc
2323
];
24+
"mopidy-subidy.age".publicKeys = [
25+
users.desktop
26+
users.yubikey-5c
27+
users.yubikey-5c-nfc
28+
];
2429
}

0 commit comments

Comments
 (0)