programs: ship cantata & mopidy for music playing (desktop)
This commit is contained in:
36
hosts/common/programs/cantata.nix
Normal file
36
hosts/common/programs/cantata.nix
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
# cantata is a mpd frontend.
|
||||||
|
# before launching it, run `mopidy` in some tab
|
||||||
|
# TODO: auto-launch mopidy when cantata launches?
|
||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
sane.programs.cantata = {
|
||||||
|
persist.plaintext = [
|
||||||
|
".cache/cantata" # album art
|
||||||
|
".local/share/cantata/library" # library index (?)
|
||||||
|
];
|
||||||
|
fs.".config/cantata/cantata.conf".symlink.text = ''
|
||||||
|
[General]
|
||||||
|
fetchCovers=true
|
||||||
|
storeCoversInMpdDir=false
|
||||||
|
version=2.5.0
|
||||||
|
|
||||||
|
[Connection]
|
||||||
|
allowLocalStreaming=true
|
||||||
|
applyReplayGain=true
|
||||||
|
autoUpdate=false
|
||||||
|
dir=~/Music
|
||||||
|
host=localhost
|
||||||
|
partition=
|
||||||
|
passwd=
|
||||||
|
port=6600
|
||||||
|
replayGain=off
|
||||||
|
streamUrl=
|
||||||
|
|
||||||
|
[LibraryPage]
|
||||||
|
artist\gridZoom=100
|
||||||
|
artist\searchActive=false
|
||||||
|
artist\viewMode=detailedtree
|
||||||
|
'';
|
||||||
|
suggestedPrograms = [ "mopidy" ];
|
||||||
|
};
|
||||||
|
}
|
@@ -4,6 +4,7 @@
|
|||||||
imports = [
|
imports = [
|
||||||
./aerc.nix
|
./aerc.nix
|
||||||
./assorted.nix
|
./assorted.nix
|
||||||
|
./cantata.nix
|
||||||
./chatty.nix
|
./chatty.nix
|
||||||
./cozy.nix
|
./cozy.nix
|
||||||
./element-desktop.nix
|
./element-desktop.nix
|
||||||
|
@@ -1,19 +1,86 @@
|
|||||||
|
# load the web client at:
|
||||||
|
# - <http://localhost:6680>
|
||||||
|
# chat:
|
||||||
|
# - <https://mopidy.zulipchat.com/>
|
||||||
|
# update local file index with
|
||||||
|
# - `mopidy --config ... local scan`
|
||||||
|
# mopidy hosts mpd (when enabled) at localhost:6600; no password
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
# TODO: upstream this as `mopidy.withExtensions`
|
||||||
|
# this is borrowed from the nixos mopidy service
|
||||||
|
mopidyWithExtensions = extensions: with pkgs; buildEnv {
|
||||||
|
name = "mopidy-with-extensions-${mopidy.version}";
|
||||||
|
|
||||||
|
paths = lib.closePropagation extensions;
|
||||||
|
pathsToLink = [ "/${mopidyPackages.python.sitePackages}" ];
|
||||||
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
|
postBuild = ''
|
||||||
|
makeWrapper ${mopidy}/bin/mopidy $out/bin/mopidy \
|
||||||
|
--prefix PYTHONPATH : $out/${mopidyPackages.python.sitePackages}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
in
|
||||||
{
|
{
|
||||||
sane.programs.mopidy = {
|
sane.programs.mopidy = {
|
||||||
};
|
package = mopidyWithExtensions (with pkgs; [
|
||||||
services.mopidy = lib.mkIf config.sane.programs.mopidy.enabled {
|
mopidy-iris # web client: <https://github.com/jaedb/Iris>
|
||||||
enable = true;
|
|
||||||
extensionPackages = with pkgs; [
|
|
||||||
mopidy-jellyfin
|
mopidy-jellyfin
|
||||||
|
mopidy-local
|
||||||
mopidy-mpd
|
mopidy-mpd
|
||||||
mopidy-mpris
|
mopidy-mpris
|
||||||
mopidy-spotify
|
mopidy-spotify
|
||||||
# TODO: mopidy-podcast, mopidy-youtube
|
# TODO: mopidy-podcast, mopidy-youtube
|
||||||
];
|
|
||||||
|
|
||||||
# config docs: <https://docs.mopidy.com/en/latest/config/>
|
# alternate web clients:
|
||||||
# query current config with: `sudo mopidyctl config`
|
# mopidy-moped: <https://github.com/martijnboland/moped>
|
||||||
# configuration = "";
|
# mopidy-muse: <https://github.com/cristianpb/muse>
|
||||||
|
]);
|
||||||
|
persist.plaintext = [
|
||||||
|
".local/share/mopidy/local" # thumbs, library db
|
||||||
|
];
|
||||||
|
persist.private = [
|
||||||
|
".local/share/mopidy/http" # cookie
|
||||||
|
];
|
||||||
|
secrets.".config/mopidy/mopidy.conf" = ../../../secrets/common/mopidy.conf.bin;
|
||||||
|
# other folders:
|
||||||
|
# - .cache/mopidy
|
||||||
|
# - .config/mopidy
|
||||||
};
|
};
|
||||||
|
# services.mopidy = lib.mkIf config.sane.programs.mopidy.enabled {
|
||||||
|
# enable = true;
|
||||||
|
# extensionPackages = with pkgs; [
|
||||||
|
# mopidy-iris # web client: <https://github.com/jaedb/Iris>
|
||||||
|
# mopidy-jellyfin
|
||||||
|
# mopidy-local
|
||||||
|
# mopidy-mpd
|
||||||
|
# mopidy-mpris
|
||||||
|
# mopidy-spotify
|
||||||
|
# # TODO: mopidy-podcast, mopidy-youtube
|
||||||
|
|
||||||
|
# # alternate web clients:
|
||||||
|
# # mopidy-moped: <https://github.com/martijnboland/moped>
|
||||||
|
# # mopidy-muse: <https://github.com/cristianpb/muse>
|
||||||
|
# ];
|
||||||
|
|
||||||
|
# # config docs: <https://docs.mopidy.com/en/latest/config/>
|
||||||
|
# # to query config:
|
||||||
|
# # - `systemctl cat mopidy`
|
||||||
|
# # - copy the Exec line, then run it as daemon user with `config` arg, e.g.
|
||||||
|
# # - `sudo -u mopidy /nix/store/975g6qzz72ajsj7qcmq8123jbr0iq7fg-mopidy-with-extensions-3.4.1/bin/mopidy --config /nix/store/678mid699jcz4y56avyg4nsmjy0zmp7v-mopidy.conf config`
|
||||||
|
# configuration = ''
|
||||||
|
# [file]
|
||||||
|
# media_dirs =
|
||||||
|
# /home/colin/Music
|
||||||
|
|
||||||
|
# [iris]
|
||||||
|
# country = US
|
||||||
|
# locale = en_US
|
||||||
|
# '';
|
||||||
|
# # TODO:
|
||||||
|
# # set spotify.username, spotify.password, jellyfin....
|
||||||
|
# # but these are secret so can't go in the above configuration line
|
||||||
|
# # there is a configurationFiles option, though.
|
||||||
|
# };
|
||||||
}
|
}
|
||||||
|
@@ -41,7 +41,7 @@
|
|||||||
# "lollypop"
|
# "lollypop"
|
||||||
"mate.engrampa" # archive manager
|
"mate.engrampa" # archive manager
|
||||||
"mepo" # maps viewer
|
"mepo" # maps viewer
|
||||||
"mopidy" # music server (like mpd)
|
"cantata" # music player (mpd frontend)
|
||||||
"mpv"
|
"mpv"
|
||||||
# "networkmanagerapplet"
|
# "networkmanagerapplet"
|
||||||
# "newsflash"
|
# "newsflash"
|
||||||
|
48
secrets/common/mopidy.conf.bin
Normal file
48
secrets/common/mopidy.conf.bin
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
{
|
||||||
|
"data": "ENC[AES256_GCM,data:nSECbcMUQl9vEvJ8YoiOljQVbe2NLUNlxdqMeMwyk7XFGY/WIWWyNxkLeBr+Kh/lxVITzqcCVVzbiLrb4uvmmWXC3FS/leRNy7Q/mIzM3gLUSFLgEp1DuIEY6eXUs7yu8F84yp64Mu34aH3YYTJpLJwxdW4dO/6VjqpRl0ATys3rqZFGleWjk+vcHhLzlGx0ejg6bDjk,iv:kc/qIhYa1WjDFnID6sSksRXSvy4C5QOyk2Q4cWOYUWA=,tag:B18i22EdAytP2ctzl0kzbQ==,type:str]",
|
||||||
|
"sops": {
|
||||||
|
"kms": null,
|
||||||
|
"gcp_kms": null,
|
||||||
|
"azure_kv": null,
|
||||||
|
"hc_vault": null,
|
||||||
|
"age": [
|
||||||
|
{
|
||||||
|
"recipient": "age1tnl4jfgacwkargzeqnhzernw29xx8mkv73xh6ufdyde6q7859slsnzf24x",
|
||||||
|
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBQSGNFU00rSERHQXJJTnpL\nRXNoYm4xazN6Z3dvMDZ1OTA2Q1g3OURrRFdjCkgxaUZaN3k5RHFGM0hTWkRybFBV\ncnVZVkFiV0NWeXJoWGloV0c5Um01cncKLS0tIGZFODFxeXVpNmkyRFN0SE1ZK2J3\nTkd6dzFNT0F5dTJ6VGVVYTJwY2xCL2MKTDHVtRp1uojeHJ2dILTvjQTXtWU0A2ZT\n6KEe5pkoadVoI3lu70RLyGGQuImGgc/ZsEJiV2CHIuKG17J3bexBBw==\n-----END AGE ENCRYPTED FILE-----\n"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"recipient": "age1j2pqnl8j0krdzk6npe93s4nnqrzwx978qrc0u570gzlamqpnje9sc8le2g",
|
||||||
|
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSB2TWYwdmQxVzRESGR4Q0J1\nN0JXK2V3SXB1SWJxeHJKNjFpOXI3ZkFTbFNJCmNQeHRiM281MXliNDVHNExVMGtX\nR3FZcmtTdWhtaU1NSmlwbjdkcUJtVGcKLS0tIEtJaXBsZXVBSFRnZjRWRGdVcVBQ\nQ0RqQmhMZEJ5cXBkVk1CdWZsMFROSTAKx+uAnbpXblkJi8zSiyJXO3UtHTydGbM4\naSN58lAR3yCuSuNHdUlDXr9TQfF4rTHEBGMBFh0ey/CmX8hzoJXiDQ==\n-----END AGE ENCRYPTED FILE-----\n"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"recipient": "age1z8fauff34cdecr6sjkre260luzxcca05kpcwvhx988d306tpcejsp63znu",
|
||||||
|
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBpZllMSHRDN0tUajdwdzR6\nOTdadjN3L2JFR2RNcVVob0NLWGlycFdMNm5RCk5XbTExc09leGpsMUxUTWFBYjhy\nMnNDazI5WHprMFRNWVc1QkdKTkppZmsKLS0tIEJWRzhBb2lKeDc5bHl6OXdvMDZD\nS0UxSXM5R2xOUU1Ud2s2UmRkVE5uNlkKAHjY/gUahrkgAbb+2Q43asvVrgdaKfWC\nO5JPHo+krBydvNZ2k4261lBF8zwJ++D+qZK396WxChMH/RhiiPUBSQ==\n-----END AGE ENCRYPTED FILE-----\n"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"recipient": "age1zsrsvd7j6l62fjxpfd2qnhqlk8wk4p8r0dtxpe4sdgnh2474095qdu7xj9",
|
||||||
|
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSAxYVJYL3pmVjRmczJjaTlF\nUW9OOGU5dzdWTHg1bzh2OHR5d0tNTGF0NmdRClQxNVF4b0Z6ZzF0YndvWmZoMlBD\nQXB0dmZhQ3N6S2VjRFh5bko1LzJYR3MKLS0tIEgxS3kzWHJSUStUcDRDRG84bGJ3\nYmRNeEMybDB3b1dFV1QxNmhJeTNCM2MKywwuf2TNR0VuEQcaZB4uYdxSyG6dzNiy\nX2/ke2xG8yApIKW5WIrOO+UgGB9i7ZdiGKUx73YUKgm/4IECfbHxSg==\n-----END AGE ENCRYPTED FILE-----\n"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"recipient": "age1vnw7lnfpdpjn62l3u5nyv5xt2c965k96p98kc43mcnyzpetrts9q54mc9v",
|
||||||
|
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBLdmtEWXJDUUdKdjF6QmNY\nUGd3dW5BNXY0NnB3WE9aSWF3RWxiNi9TMDJnCmhxaDBEVHRWelpLdEgvT2d5Uy9Y\nOUFBK1ZNdHl1Mi9kZ0dZSmpVUVJyQzAKLS0tIFNpeDBFa25wNmhqZk5vT0dOYk1B\nSWhKV2JKMmh4RllQWC9EQ08wVmZ4UmsKQVCwHKBSFOTrG7z3njR7HV1CC/ijQksT\nB4iYhs8Vt91QPLvVte7P9PYk5yNu3cjeV65h4jHn9G/RzfUnnNyfPw==\n-----END AGE ENCRYPTED FILE-----\n"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"recipient": "age1w7mectcjku6x3sd8plm8wkn2qfrhv9n6zhzlf329e2r2uycgke8qkf9dyn",
|
||||||
|
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBBRm9PMWpxMjlsTHpnMVk1\nRmFNclNqdFRPc1N0bU12VEpPcjhDS2JIbXpVCmo1TDdKYTZrNW8vSUdScnRSQnVP\nMENQUGg4Nm1ocEpYS2JGaCtsdloxc28KLS0tIHNjaWE4dFFyU1FBakhoa0VMZFBT\nTG1FODZGYUQwb2w5Z1pvV2tuS0xFajAKAADHxS6UTmdsAxtbR7ioemPLmxVqTEd/\nD1rhXomfMQ7NSkb5SUh8z7axGxY8BziVheQJWGwdIn6+u2KiI8b1ow==\n-----END AGE ENCRYPTED FILE-----\n"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"recipient": "age1tzlyex2z6t88tg9h82943e39shxhmqeyr7ywhlwpdjmyqsndv3qq27x0rf",
|
||||||
|
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBYYUp4VjV5d05xQWFXRjR2\nd1crNVZyRmtuM05aZHAzNE02NC9zVER4SVRFCjN2c0VlZjh6NUJheEFuSFE1cVlW\nTUhTdjhRNXJXanJFTEhlbGhaRUczVWsKLS0tIGlwRTZBWEhQSzFhY1BYQXdyMVVk\nRUFZcHQ5c1MyaVp5ZVJNamxuc1pXOUEKTsSzOuNOReMPZ99ICOW8/TCQBt8jjP6a\nO9DnwjImazq0i3HKjT+dgNYNlwG+MaUqUNdqIixjbE7s7pskSZlgjw==\n-----END AGE ENCRYPTED FILE-----\n"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"recipient": "age18vq5ktwgeaysucvw9t67drqmg5zd5c5k3le34yqxckkfj7wqdqgsd4ejmt",
|
||||||
|
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBMUGlWNkg3aVpwZnppTUpY\nVzdaeXlHWUhFeTZsTDNkY1B2a1RRajQ5YUJvCmI1a0pOTjlnai91MjIrM1I2d3hI\nd0ZkOGk2WWo0U0hOdnRmaW1FQm8zR3cKLS0tIHBYdnFqdHRHbTM2OHpRcXFNN3Bz\nQUZVNnZSQkUxZGhRM2liSXZTRVRHcWsKGMhYTWmtcRy/WjxD9uWe+iQCEMncebzr\nnkOmOPHOdnvJY+WynTAbHs7nYKKRLizchN7WHLxWah39C5KzmTSQyg==\n-----END AGE ENCRYPTED FILE-----\n"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"lastmodified": "2023-08-12T02:26:43Z",
|
||||||
|
"mac": "ENC[AES256_GCM,data:WdiOwtLDqpAdOkMxN1fpdyHrQibOH8vPVNI/MBiJKHrUj6k32Lb1FF+zE50PJU25eDW51X6j/PxtHmKwxZ/kGRYtE3i0Nu9+Its9DLuFrdAgKb+8xlUGZvsYrOgqCu8bKqtPt2iAu+kjzENkrbcXha3EwtAabYC8XJrf76LSvV0=,iv:HZcFgDBeq/Ga5qd36H1eQEF9e0056chbSz1SnvtSkP0=,tag:bJ1ruuQkwbQK2/GJSHJnNg==,type:str]",
|
||||||
|
"pgp": null,
|
||||||
|
"unencrypted_suffix": "_unencrypted",
|
||||||
|
"version": "3.7.3"
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user