marleyos/modules/nixos/services/mopidy/default.nix

39 lines
690 B
Nix
Raw Normal View History

2025-03-09 01:38:36 +00:00
{
lib,
config,
pkgs,
...
}: let
cfg = config.marleyos.services.mopidy;
in {
options.marleyos.services.mopidy.enable = lib.mkEnableOption "mopidy";
config = lib.mkIf cfg.enable {
2025-03-16 01:59:27 +00:00
age.secrets."mopidy-jellyfin.conf" = {
file = ../../../../secrets/mopidy-jellyfin.conf.age;
owner = "mopidy";
mode = "600";
};
2025-03-09 01:38:36 +00:00
services.mopidy = {
enable = true;
extensionPackages = with pkgs; [
mopidy-mpd
2025-03-16 01:59:27 +00:00
mopidy-jellyfin
2025-03-09 01:38:36 +00:00
];
configuration =
# ini
''
[mpd]
hostname = ::
'';
2025-03-16 01:59:27 +00:00
extraConfigFiles = [
config.age.secrets."mopidy-jellyfin.conf".path
];
2025-03-09 01:38:36 +00:00
};
};
}