organize packages
This commit is contained in:
53
modules/software/music/beets.nix
Normal file
53
modules/software/music/beets.nix
Normal file
@@ -0,0 +1,53 @@
|
||||
{
|
||||
den.aspects.beets = {
|
||||
homeManager = { pkgs, ... }: {
|
||||
home = {
|
||||
packages = with pkgs; [
|
||||
beets
|
||||
ffmpeg
|
||||
chromaprint
|
||||
];
|
||||
|
||||
file.".config/beets/config.yaml".text = ''
|
||||
library: ~/.local/share/beets/library.db
|
||||
directory: ~/Music
|
||||
|
||||
import:
|
||||
write: true
|
||||
copy: true
|
||||
|
||||
plugins:
|
||||
- convert
|
||||
- fetchart
|
||||
- embedart
|
||||
- fromfilename
|
||||
- chroma
|
||||
- smartplaylist
|
||||
|
||||
paths:
|
||||
default: $artist/$album/$track - $title
|
||||
|
||||
convert:
|
||||
auto: true
|
||||
format: opus
|
||||
formats:
|
||||
opus: ffmpeg -i $source -y -vn -c:a libopus -b:a 160k $dest
|
||||
dest: /home/bug/Music
|
||||
|
||||
fetchart:
|
||||
auto: yes
|
||||
ifempty: yes
|
||||
art_filename: folder
|
||||
|
||||
embedart:
|
||||
auto: yes
|
||||
|
||||
smartplaylist:
|
||||
playlist_dir: ~/Music/playlists
|
||||
relative_to: library
|
||||
output: extm3u
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
39
modules/software/music/mpd.nix
Normal file
39
modules/software/music/mpd.nix
Normal file
@@ -0,0 +1,39 @@
|
||||
{
|
||||
den.aspects.mpd = {
|
||||
nixos = {
|
||||
services = {
|
||||
mpd = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
music_directory = "/home/bug/Music";
|
||||
|
||||
decoder = [
|
||||
{
|
||||
plugin = "ffmpeg";
|
||||
enabled = "yes";
|
||||
}
|
||||
{
|
||||
plugin = "opus";
|
||||
enabled = "no";
|
||||
}
|
||||
];
|
||||
|
||||
audio_output = [{
|
||||
type = "pipewire";
|
||||
name = "PipeWire Sound Server";
|
||||
}];
|
||||
};
|
||||
|
||||
user = "bug";
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services = {
|
||||
mpd.environment = {
|
||||
XDG_RUNTIME_DIR = "/run/user/1000";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
5
modules/software/music/music.nix
Normal file
5
modules/software/music/music.nix
Normal file
@@ -0,0 +1,5 @@
|
||||
{ den, ... }: {
|
||||
den.aspects.music = {
|
||||
includes = with den.aspects; [ beets player nicotine mpd ];
|
||||
};
|
||||
}
|
||||
9
modules/software/music/nicotine.nix
Normal file
9
modules/software/music/nicotine.nix
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
den.aspects.nicotine = {
|
||||
nixos = { pkgs, ... }: {
|
||||
users.users.bug.packages = with pkgs; [
|
||||
nicotine-plus
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
14
modules/software/music/player.nix
Normal file
14
modules/software/music/player.nix
Normal file
@@ -0,0 +1,14 @@
|
||||
{ ... }: {
|
||||
den.aspects.player = {
|
||||
nixos = { pkgs, ... }: {
|
||||
users.users.bug.packages = with pkgs; [
|
||||
euphonica
|
||||
];
|
||||
|
||||
services.flatpak.packages = [
|
||||
"org.gnome.Decibels"
|
||||
"org.pipewire.Helvum"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user