home: Re‐enable music support
This commit is contained in:
parent
773b548086
commit
e85c40310a
2 changed files with 65 additions and 0 deletions
|
@ -23,6 +23,7 @@ in {
|
|||
./sioyek.nix
|
||||
./texlive.nix
|
||||
./mpv.nix
|
||||
./music.nix
|
||||
];
|
||||
|
||||
home.stateVersion = "24.11";
|
||||
|
|
64
home/config/nil/music.nix
Normal file
64
home/config/nil/music.nix
Normal file
|
@ -0,0 +1,64 @@
|
|||
{ ... }: { config, lib, pkgs, ... }@args:
|
||||
let
|
||||
osConfig = args.osConfig or { };
|
||||
|
||||
systemctl = osConfig.systemd.package + /bin/systemctl;
|
||||
in lib.mkIf (osConfig.hardware.graphics.enable or false) {
|
||||
programs.beets = {
|
||||
enable = true;
|
||||
settings = {
|
||||
directory = "~/msc";
|
||||
import.reflink = "auto";
|
||||
|
||||
plugins = [
|
||||
"chroma"
|
||||
"spotify"
|
||||
"fromfilename"
|
||||
|
||||
"fetchart"
|
||||
"lyrics"
|
||||
"replaygain"
|
||||
|
||||
"duplicates"
|
||||
"hook"
|
||||
];
|
||||
|
||||
hook.hooks = [
|
||||
{
|
||||
event = "import";
|
||||
command = "${systemctl} --user start mopidy-scan.service";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
services.mopidy = {
|
||||
enable = true;
|
||||
extensionPackages = with pkgs; [
|
||||
mopidy-iris
|
||||
mopidy-local
|
||||
mopidy-mpd
|
||||
mopidy-mpris
|
||||
];
|
||||
|
||||
settings = {
|
||||
core = {
|
||||
cache_dir = "$XDG_CACHE_DIR/mopidy";
|
||||
config_dir = "$XDG_CONFIG_DIR/mopidy";
|
||||
data_dir = "$XDG_DATA_DIR/mopidy";
|
||||
};
|
||||
|
||||
audio.mixer = "none";
|
||||
file.media_dirs = [ "$XDG_MUSIC_DIR" ];
|
||||
local.media_dir = "$XDG_MUSIC_DIR";
|
||||
|
||||
mpd.hostname = "localhost";
|
||||
|
||||
http = {
|
||||
hostname = "localhost";
|
||||
port = 6680;
|
||||
default_app = "iris";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue