feat(beats): init
build / build (push) Successful in 3m10s

This commit is contained in:
2026-07-08 23:19:20 -06:00
parent b431bffe11
commit 0781321e32
3 changed files with 69 additions and 0 deletions
+1
View File
@@ -67,6 +67,7 @@
murmur.enable = true;
anki-sync-server.enable = true;
vaultwarden.enable = true;
beets.enable = true;
servarr = {
enable = true;
prowlarr.enable = true;
+67
View File
@@ -0,0 +1,67 @@
{ config, lib, pkgs, ... }:
let cfg = config.sydnix.deertopia.beets;
in {
options.sydnix.deertopia.beets = {
enable = lib.mkEnableOption "Beets";
user = lib.mkOption {
default = "beets";
type = lib.types.str;
description = ''
Name of the user which owns the Beets database.
'';
};
group = lib.mkOption {
default = "beets";
type = lib.types.str;
description = ''
Name of the group which owns the Beets database.
'';
};
};
config = lib.mkIf cfg.enable {
users.users.${cfg.user} = {
description = "Beets";
isSystemUser = true;
inherit (cfg) group;
};
users.groups.${cfg.group} = {};
# Persist allowed directories.
sydnix.impermanence.directories = [
{
directory = "/var/lib/beets";
inherit (cfg) user group;
mode = "u=rwx,g=rwx,o=";
}
];
environment.systemPackages = [
pkgs.beets
];
environment.sessionVariables.BEETSDIR = "/var/lib/beets";
systemd.tmpfiles.settings."50-var-lib-beets-beets-yaml" = {
"/var/lib/beets/beets.yaml"."L+".argument =
lib.toString
(pkgs.writeText
"beets.yaml"
(lib.toJSON {
directory = "/media/library/music";
library = "/var/lib/beets/beets.db";
import = {
copy = true;
write = true;
incremental = true;
};
paths = {
default = "$albumartist/$album%aunique{} ($year)/$track $title";
singleton = "Non-Album/$artist/$title";
comp = "Compilations/$album%aunique{} ($year)/$title";
};
}));
};
};
}
+1
View File
@@ -18,6 +18,7 @@
"slskd"
# Can access Nixarr's media.
"media"
"beets"
];
initialHashedPassword =
"$y$j9T$aEFDDwdTZbAc6VQRXrkBJ0$K8wxTGTWDihyX1wxJ.ZMH//wmQFfrGGUkLkxIU0Lyq8";