Server: add beets

This commit is contained in:
Toast 2025-09-12 01:57:22 +02:00
parent ae0393ae37
commit eb2a4ea67a
2 changed files with 45 additions and 0 deletions

44
roles/server/beets.nix Normal file
View 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"
];
};
};
};
}

View file

@ -19,5 +19,6 @@
./prometheus.nix ./prometheus.nix
./immich.nix ./immich.nix
./copyparty.nix ./copyparty.nix
./beets.nix
]; ];
} }