home: add WIP mopidy config (need to fix pkg)
This commit is contained in:
parent
9ae057ee36
commit
152a3b3c55
@ -13,6 +13,9 @@ in
|
||||
config = lib.mkIf cfg.enable {
|
||||
nixfiles = {
|
||||
profile.base.enable = true;
|
||||
programs = {
|
||||
mopidy.enable = true;
|
||||
};
|
||||
packageSets = {
|
||||
communication.enable = true;
|
||||
dev.enable = true;
|
||||
|
@ -2,5 +2,6 @@
|
||||
{
|
||||
imports = [
|
||||
./comma.nix
|
||||
./mopidy.nix
|
||||
];
|
||||
}
|
||||
|
29
home/programs/mopidy.nix
Normal file
29
home/programs/mopidy.nix
Normal file
@ -0,0 +1,29 @@
|
||||
{ lib, pkgs, config, outputs, osConfig ? {}, ... }:
|
||||
let
|
||||
cfg = config.nixfiles.programs.mopidy;
|
||||
in
|
||||
{
|
||||
options.nixfiles.programs.mopidy = {
|
||||
enable = lib.mkEnableOption "mopidy configuration";
|
||||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
xdg.configFile."mopidy/mopidy.conf".enable = lib.mkForce false;
|
||||
services.mopidy = {
|
||||
enable = lib.mkDefault true;
|
||||
extensionPackages = with pkgs; [
|
||||
mopidy-mpd
|
||||
mopidy-iris
|
||||
mopidy-mpris
|
||||
mopidy-local
|
||||
mopidy-jellyfin
|
||||
mopidy-bandcamp
|
||||
mopidy-ytmusic
|
||||
mopidy-soundcloud
|
||||
# outputs.packages.${pkgs.system}.mopidy-autoplay
|
||||
];
|
||||
};
|
||||
home.packages = with pkgs; [
|
||||
(ncmpcpp.override { visualizerSupport = true; })
|
||||
];
|
||||
};
|
||||
}
|
@ -7,4 +7,5 @@ in
|
||||
google-fonts = callPackage ./google-fonts { };
|
||||
wm-helpers = callPackage ./wm-helpers { };
|
||||
atool = callPackage ./atool-wrapped { };
|
||||
mopidy-autoplay = callPackage ./mopidy-autoplay { };
|
||||
}
|
||||
|
25
pkgs/mopidy-autoplay/default.nix
Normal file
25
pkgs/mopidy-autoplay/default.nix
Normal file
@ -0,0 +1,25 @@
|
||||
{ lib, python3Packages, fetchPypi, mopidy }:
|
||||
|
||||
# based on mopidy/jellyfin.nix
|
||||
python3Packages.buildPythonApplication rec {
|
||||
pname = "mopidy-autoplay";
|
||||
version = "0.2.3";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit version;
|
||||
pname = "Mopidy-Autoplay";
|
||||
sha256 = "sha256-E2Q+Cn2LWSbfoT/gFzUfChwl67Mv17uKmX2woFz/3YM=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [ mopidy ];
|
||||
|
||||
# no tests implemented
|
||||
doCheck = false;
|
||||
pythonImportsCheck = [ "mopidy_autoplay" ];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://codeberg.org/sph/mopidy-autoplay";
|
||||
description = "Mopidy extension to automatically pick up where you left off and start playing the last track from the position before Mopidy was shut down.";
|
||||
license = licenses.asl20;
|
||||
};
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user