Server: add beets
This commit is contained in:
parent
ae0393ae37
commit
eb2a4ea67a
2 changed files with 45 additions and 0 deletions
44
roles/server/beets.nix
Normal file
44
roles/server/beets.nix
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
{...}: let
|
||||
musicDir = "/srv/music";
|
||||
in {
|
||||
users = {
|
||||
users.music = {
|
||||
isSystemUser = true;
|
||||
group = "music";
|
||||
};
|
||||
# Intended for other programs to get write permission
|
||||
groups.music = {
|
||||
members = ["toast"];
|
||||
};
|
||||
};
|
||||
systemd.tmpfiles.settings = {
|
||||
music."${musicDir}" = {
|
||||
d = {
|
||||
age = "-";
|
||||
user = "music";
|
||||
group = "music";
|
||||
mode = "2775";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
home-manager.users.toast = {config, ...}: {
|
||||
programs.beets = {
|
||||
enable = true;
|
||||
settings = {
|
||||
directory = musicDir;
|
||||
library = "${config.xdg.dataHome}/beets/library.db";
|
||||
|
||||
import = {
|
||||
move = true;
|
||||
};
|
||||
ui.color = true;
|
||||
|
||||
plugins = [
|
||||
"unimported"
|
||||
"fetchart"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue