beets module

This commit is contained in:
2025-05-17 23:34:03 +03:00
parent 1e4299f10b
commit a4ae755694
5 changed files with 197 additions and 183 deletions
+2 -2
View File
@@ -142,8 +142,8 @@ let
48000 48000
96000 96000
]; ];
"default.clock.quantum" = 256; "default.clock.quantum" = 1024;
"default.clock.min-quantum" = 64; "default.clock.min-quantum" = 256;
"default.clock.max-quantum" = 2048; "default.clock.max-quantum" = 2048;
}; };
}; };
+4 -4
View File
@@ -59,10 +59,10 @@ let
source = config.lib.file.mkOutOfStoreSymlink "${inputs.zeroq.dirs.therima-drive}"; source = config.lib.file.mkOutOfStoreSymlink "${inputs.zeroq.dirs.therima-drive}";
target = "External"; target = "External";
}; };
# "Music" = { "Music" = {
# source = config.lib.file.mkOutOfStoreSymlink "${inputs.zeroq.dirs.vetymae-drive}/Users/User/Music"; source = config.lib.file.mkOutOfStoreSymlink "${inputs.zeroq.dirs.vetymae-drive}/Users/User/Music";
# target = "Music"; target = "Music";
# }; };
"Pictures" = { "Pictures" = {
source = config.lib.file.mkOutOfStoreSymlink "${inputs.zeroq.dirs.vetymae-drive}/Users/User/Pictures"; source = config.lib.file.mkOutOfStoreSymlink "${inputs.zeroq.dirs.vetymae-drive}/Users/User/Pictures";
target = "Pictures"; target = "Pictures";
+1 -1
View File
@@ -32,7 +32,7 @@
# Extras # Extras
plasma-manager = "nix run github:nix-community/plasma-manager"; plasma-manager = "nix run github:nix-community/plasma-manager";
pip2nix = "nix run github:nix-community/pip2nix -- generate -r"; pip2nix = "nix run github:nix-community/pip2nix -- generate -r"; # https://github.com/nix-community/pip2nix
}; };
}; };
} }
+38 -34
View File
@@ -6,49 +6,53 @@
pkgs, pkgs,
... ...
}: }:
let
# Beets with plugins
depsOverlay = import ./deps.nix {
inherit (pkgs) fetchurl fetchgit fetchhg;
inherit pkgs;
};
python3 = pkgs.python3.override {
packageOverrides = depsOverlay;
};
beetsEnv = python3.withPackages (ps: [ ps.beets ]);
in
{ {
nixpkgs.overlays = [ environment.systemPackages = [
(self: super: { beetsEnv
python3 = super.python3.override { pkgs.imagemagick
packageOverrides = import ./deps.nix {
pkgs = self;
inherit (super) fetchurl fetchgit fetchhg;
};
};
})
]; ];
fileSystems."/mnt/beets/music" = { fileSystems."/mnt/beets/music" = {
device = "${inputs.zeroq.dirs.music-library}"; device = "${inputs.zeroq.dirs.music-library}";
options = [ "bind" ]; options = [
"bind"
"nofail"
];
}; };
users = { # users = {
groups = { # groups = {
beets = { }; # beets = { };
}; # };
users = { # users = {
beets = { # beets = {
isSystemUser = true; # isSystemUser = true;
#isNormalUser = true; # #isNormalUser = true;
description = "beets service"; # description = "beets service";
group = "beets"; # group = "beets";
homeMode = "0770"; # homeMode = "0770";
home = "/var/lib/beets"; # home = "/var/lib/beets";
packages = [ # packages = [ ];
(pkgs.python3.withPackages (ps: [ # shell = pkgs.bashInteractive;
ps.beets # };
ps.beetcamp # };
])) # };
];
shell = pkgs.bashInteractive;
};
};
};
systemd.tmpfiles.rules = [ systemd.tmpfiles.rules = [
"d /var/lib/beets 0770 beets beets -" # "d /var/lib/beets 0770 beets beets -"
"d /mnt/beets 0770 beets beets -" # "d /mnt/beets 0770 beets beets -"
"z /mnt/beets 0755 oqyude users -"
]; ];
} }
+26 -16
View File
@@ -1,7 +1,12 @@
# Generated by pip2nix 0.8.0.dev1 # Generated by pip2nix 0.8.0.dev1
# See https://github.com/nix-community/pip2nix # See https://github.com/nix-community/pip2nix
{ pkgs, fetchurl, fetchgit, fetchhg }: {
pkgs,
fetchurl,
fetchgit,
fetchhg,
}:
self: super: { self: super: {
"PyYAML" = super.buildPythonPackage rec { "PyYAML" = super.buildPythonPackage rec {
@@ -80,7 +85,7 @@ self: super: {
checkInputs = [ ]; checkInputs = [ ];
nativeBuildInputs = [ ]; nativeBuildInputs = [ ];
propagatedBuildInputs = [ propagatedBuildInputs = [
self."beets" #self."beets" # its doesnt matter?
self."httpx" self."httpx"
self."packaging" self."packaging"
self."pycountry" self."pycountry"
@@ -108,6 +113,11 @@ self: super: {
self."musicbrainzngs" self."musicbrainzngs"
self."platformdirs" self."platformdirs"
self."typing-extensions" self."typing-extensions"
# ext
self."requests" # For spotify, deezer, embedart, fetchart, lyrics
self."python3-discogs-client" # For discogs
self."pylast" # For lastgenre
self."beetcamp" # Another
]; ];
}; };
"certifi" = super.buildPythonPackage rec { "certifi" = super.buildPythonPackage rec {
@@ -262,20 +272,20 @@ self: super: {
nativeBuildInputs = [ ]; nativeBuildInputs = [ ];
propagatedBuildInputs = [ ]; propagatedBuildInputs = [ ];
}; };
"jellyfish" = super.buildPythonPackage rec { # "jellyfish" = super.buildPythonPackage rec { # That is Rust package
pname = "jellyfish"; # pname = "jellyfish";
version = "1.1.3"; # version = "1.1.3";
src = fetchurl { # src = fetchurl {
url = "https://files.pythonhosted.org/packages/5b/3a/f607d7d44ee5cbad51ce8e2966bde112789eeb53633558f500bc4e44c053/jellyfish-1.1.3.tar.gz"; # url = "https://files.pythonhosted.org/packages/5b/3a/f607d7d44ee5cbad51ce8e2966bde112789eeb53633558f500bc4e44c053/jellyfish-1.1.3.tar.gz";
sha256 = "17wgy021wsp8jj95v638kfk34r9yzbry3q7shnglj5npmgfs22v5"; # sha256 = "17wgy021wsp8jj95v638kfk34r9yzbry3q7shnglj5npmgfs22v5";
}; # };
format = "setuptools"; # format = "setuptools";
doCheck = false; # doCheck = false;
buildInputs = []; # buildInputs = [ ];
checkInputs = []; # checkInputs = [ ];
nativeBuildInputs = []; # nativeBuildInputs = [ ];
propagatedBuildInputs = []; # propagatedBuildInputs = [ ];
}; # };
"langdetect" = super.buildPythonPackage rec { "langdetect" = super.buildPythonPackage rec {
pname = "langdetect"; pname = "langdetect";
version = "1.0.9"; version = "1.0.9";