init
This commit is contained in:
commit
498f3050d5
145 changed files with 2964 additions and 0 deletions
6
home/programs/music/default.nix
Normal file
6
home/programs/music/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
imports = [
|
||||
./mpd.nix
|
||||
./ncmpcpp.nix
|
||||
];
|
||||
}
|
26
home/programs/music/mpd.nix
Normal file
26
home/programs/music/mpd.nix
Normal file
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
services.mpd = {
|
||||
enable = true;
|
||||
extraConfig = ''
|
||||
audio_output {
|
||||
type "pipewire"
|
||||
name "PipeWire Sound Server"
|
||||
}
|
||||
|
||||
audio_output {
|
||||
type "fifo"
|
||||
name "Visualizer feed"
|
||||
path "/tmp/mpd.fifo"
|
||||
format "44100:16:2"
|
||||
}
|
||||
|
||||
replaygain "track"
|
||||
'';
|
||||
musicDirectory = config.xdg.userDirs.music;
|
||||
};
|
||||
home.packages = [pkgs.mpc-cli];
|
||||
}
|
48
home/programs/music/ncmpcpp.nix
Normal file
48
home/programs/music/ncmpcpp.nix
Normal file
|
@ -0,0 +1,48 @@
|
|||
{pkgs, ...}: {
|
||||
programs.ncmpcpp = {
|
||||
enable = true;
|
||||
package = pkgs.ncmpcpp.override {
|
||||
visualizerSupport = true;
|
||||
clockSupport = true;
|
||||
};
|
||||
bindings = [
|
||||
{
|
||||
key = "j";
|
||||
command = "scroll_down";
|
||||
}
|
||||
{
|
||||
key = "k";
|
||||
command = "scroll_up";
|
||||
}
|
||||
{
|
||||
key = "J";
|
||||
command = ["select_item" "scroll_down"];
|
||||
}
|
||||
{
|
||||
key = "K";
|
||||
command = ["select_item" "scroll_up"];
|
||||
}
|
||||
];
|
||||
settings = {
|
||||
## Visualizer
|
||||
visualizer_data_source = "/tmp/mpd.fifo";
|
||||
visualizer_output_name = "Visualizer feed";
|
||||
visualizer_in_stereo = "yes";
|
||||
visualizer_type = "spectrum";
|
||||
visualizer_look = "●▮";
|
||||
|
||||
## Lyrics
|
||||
lyrics_fetchers = builtins.concatStringsSep "," [
|
||||
"musixmatch"
|
||||
"sing365"
|
||||
"metrolyrics"
|
||||
"justsomelyrics"
|
||||
"jahlyrics"
|
||||
"plyrics"
|
||||
"tekstowo"
|
||||
"zeneszoveg"
|
||||
"internet"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
24
home/programs/music/yams.nix
Normal file
24
home/programs/music/yams.nix
Normal file
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
# authentication needs to be done manually once
|
||||
# TODO automatic authentication thing
|
||||
home.packages = with pkgs; [yams];
|
||||
systemd.user.services.yams = {
|
||||
Unit = {
|
||||
Description = "yams";
|
||||
Requires = ["mpd.service"];
|
||||
After = ["mpd.service"];
|
||||
};
|
||||
Install = {
|
||||
WantedBy = ["default.target"];
|
||||
};
|
||||
Service = {
|
||||
Type = "simple";
|
||||
Environment = "NON_INTERACTIVE=1";
|
||||
ExecStart = "${pkgs.yams}/bin/yams -N";
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue