working in beets disocg secret

This commit is contained in:
2023-03-08 22:00:28 +00:00
parent 9c82720103
commit 24ef309194
14 changed files with 23 additions and 181 deletions

View File

@@ -1,7 +1,7 @@
keys:
- &adminkey age1jvqe2j70h97844nkz34z9k4epx3uahx50cx75ss8mty2dnxlrf7qqv9a0g
- &STUPC_WSL_UBUNTU_2204 age1jvf8rd8krchw3ph0w2let8clvyuzcdhq2ug6sm7tx86refc2z5vq4w6lxr
- &STUPC_WSL_NIXOS age1e0g0rrfdmp5f8f4xgkyp8zgxw2v5t3ldlm2t822xekdz0z6qj49q6aesuw
- &StuPC-WSL_UBUNTU_2204 age1jvf8rd8krchw3ph0w2let8clvyuzcdhq2ug6sm7tx86refc2z5vq4w6lxr
- &StuPC-WSL_NIXOS age1e0g0rrfdmp5f8f4xgkyp8zgxw2v5t3ldlm2t822xekdz0z6qj49q6aesuw
- &GO3_WSL_NIXOS age187fdx6pc2559tjh03jrcwp6yj8whd70h666g8a0ptyr0z49tfcsssdx6au
- &STU_ID age1r86w07gy3nm2ltkqx7wcv94wzneeqmqvcm88nzw4g902kdgwgvdqvjumrj
creation_rules:
@@ -9,8 +9,8 @@ creation_rules:
key_groups:
- age:
- *adminkey
- *STUPC_WSL_UBUNTU_2204
- *STUPC_WSL_NIXOS
- *StuPC-WSL_UBUNTU_2204
- *StuPC-WSL_NIXOS
- *GO3_WSL_NIXOS
- path_regex: user-secrets.yaml$
key_groups:
@@ -27,7 +27,7 @@ creation_rules:
key_groups:
- age:
- *adminkey
- *STUPC_WSL_NIXOS
- *StuPC-WSL_NIXOS
- path_regex: secrets/hosts/Go3/.*$
key_groups:

View File

@@ -100,10 +100,10 @@ in
./hosts/WSL/Go3
];
};
StuPC_WSL = nixpkgs.lib.nixosSystem {
StuPC-WSL = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs outputs; };
modules = [
./hosts/WSL/StuPC_WSL
./hosts/WSL/StuPC-WSL
];
};

View File

@@ -117,10 +117,10 @@
./hosts/Go3
];
};
StuPC_WSL = nixpkgs.lib.nixosSystem {
StuPC-WSL = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs outputs lib; hostName = "StuPC";};
modules = [
./hosts/StuPC_WSL
./hosts/StuPC-WSL
];
};
@@ -140,10 +140,10 @@
inputs.sops-nix.homeManagerModules.sops
];
};
"sstent@StuPC_WSL" = home-manager.lib.homeManagerConfiguration {
"sstent@StuPC-WSL" = home-manager.lib.homeManagerConfiguration {
# pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
pkgs = pkgs;
extraSpecialArgs = { inherit inputs outputs lib; hostName = "StuPC_WSL";};
extraSpecialArgs = { inherit inputs outputs lib; hostName = "StuPC-WSL";};
modules = [
# > Our main home-manager configuration file <
./home-manager/users/sstent

View File

@@ -1,166 +0,0 @@
{ config, pkgs, lib, ... }:
with lib;
let cfg = config.custom.beets;
in {
options.custom.beets = {
enable = mkOption {
type = types.bool;
default = false;
description = "Enable Beets";
};
};
config = mkIf cfg.enable {
# xdg.configFile."beets/config.old".source = config.lib.file.mkOutOfStoreSymlink /run/user/1000/secrets/test;
programs.beets = {
enable = true;
settings = {
album_fields = {
artist_grouping = ''
albumartist_dev = ["devin townsend", "devin townsend project","punky brüster","strapping young lad"]
DevinFolder = "_Devin Townsend Projects"
if albumartist.lower() in albumartist_dev:
return DevinFolder
albumartist_les = ["primus", "les claypool","les claypool and the holy mackerel","les claypools duo de twang","oysterhead","colonel claypools bucket of bernie brains","the les claypool frog brigade","the claypool lennon delirium"]
LesFolder = "_Les Claypool Projects"
if albumartist.lower() in albumartist_les:
return LesFolder
'';
atype = ''
atypes = ['EP', 'Single','Live']
for atype in atypes:
if atype.lower() == albumtype.lower():
return f' [{atype}]'
'';
first_artist = "albumartist.split(', ',1)[0:1][0]";
};
albumtypes = {
bracket = "[]";
ignore_va = "compilation";
types = [
{ ep = "EP"; }
{ single = "Single"; }
{ soundtrack = "OST"; }
{ live = "Live"; }
{ compilation = "Anthology"; }
{ remix = "Remix"; }
];
};
aunique = {
bracket = "[]";
disambiguators = "media";
keys = "albumartist album";
};
copyartifacts = { extensions = ".cue .log .jpg .jpeg .png .txt"; };
directory = "/mnt/q/CleanMusic/";
embedart = { auto = true; };
extrafiles = {
paths = {
artworkdir = "$albumpath/Artwork";
"ext:cue" = "$albumpath/$disc_folder/Data/";
"ext:jpg" = "$albumpath/$disc_folder/";
"ext:log" = "$albumpath/$disc_folder/Data/";
};
patterns = {
all = "*.*";
artworkdir = [ "[sS]cans/" "[aA]rtwork/" "[aA]rt/" "[cC]over/" ];
};
};
fetchart = {
auto = true;
sources = "filesystem coverart itunes amazon albumart fanarttv";
};
import = {
autotag = true;
bell = false;
copy = true;
languages = "en";
log = "~/.config/beets/beet.log";
move = false;
write = true;
};
item_fields = {
isMultidisc = "1 if disctotal > 1 else 0";
myBitDepth = "('' if bitdepth != 24 else '[24bit - '+ media + ']')";
myDisc = "('' if disctotal <= 1 else str(disc) + ' - ')";
mySongartist =
"artist + ' - ' if artist != albumartist and artist != '' else ''";
};
library = "~/musiclibrary.db";
match = {
max_rec = {
album = "strong";
album_id = "strong";
albumdisambig = "strong";
artist = "strong";
catalognum = "strong";
country = "strong";
label = "strong";
media = "strong";
mediums = "strong";
missing_tracks = "medium";
source = "strong";
track_artist = "strong";
track_id = "strong";
track_index = "strong";
track_length = "strong";
track_title = "strong";
tracks = "strong";
unmatched_tracks = "medium";
year = "strong";
};
strong_rec_thresh = 5.0e-2;
};
missing = {
format_album = "$albumartist: ($year) $album $albumtype $atype";
format_item =
"$albumartist - $album [$albumtype]$atype: $track/$tracktotal $title";
};
musicbrainz = {
pass = "7ANCLPczDNFn6Sf65vdZ";
user = "shapechecker";
};
original_date = true;
paths = {
"albumtype:soundtrack" =
"Soundtracks/$albumartist - $album%aunique{} ($year)/$myDisc$track - $artist - $title";
comp =
"Compilations/$albumartist/($year) $album%aunique{}/$myDisc$track - $artist - $title";
default =
"%if{$artist_grouping,$artist_grouping/}$first_artist/$year - $album $atype%aunique{media}[%upper{$format}$bitdepth]%if{$media,[$media]}/%if{$isMultidisc,$disc - }$track - $mySongartist$title";
};
per_disc_numbering = true;
plugins = [
"albumtypes"
"duplicates"
"fetchart"
"rewrite"
"missing"
"chroma"
"embedart"
"inline"
"discogs"
"mbcollection"
];
rewrite = {
"artist Björk & Tríó Guðmundar Ingólfssonar" = "Björk";
"artist Brant Bjork and The Low Desert Punk Band" = "Brant Bjork";
"artist King Gizzard & The Lizard Wizard with Mild High Club" =
"King Gizzard & The Lizard Wizard";
"artist Kyuss _ Queens of the Stone Age" = "Kyuss";
"artist Professor Elemental & Tom Caruana" = "Professor Elemental";
"artist Resin Dogs Feat Spikey Tee" = "Resin Dogs";
"artist Sepultura _ Exodus" = "Sepultura";
"artist The Knife in collaboration with Mount Sims and Planningtorock" =
"The Knife";
"artist Unida _ Dozer" = "Unida";
};
};
};
};
}

View File

@@ -7,9 +7,6 @@ username = config.home.username;
secretstore = config._secretstore;
# host = config.networking.hostName;
in {
# imports = [
# "${inputs.self}/lib/hm_secrets.nix"

View File

@@ -9,7 +9,7 @@
# system.stateVersion = "22.11";
nixpkgs.hostPlatform.system = "x86_64-linux";
networking.hostName = "StuPC_WSL";
networking.hostName = "StuPC-WSL";
custom.mullvad.enable = true;
wsl = {
enable = true;

View File

@@ -15,6 +15,17 @@ in {
# xdg.configFile."beets/config.old".source = config.lib.file.mkOutOfStoreSymlink /run/user/1000/secrets/test;
# secrets.discogs_json = {
# mode = "0440";
# owner = config.users.users.sstent.name;
# group = config.users.users.sstent.group;
# };
sops = {
secrets.discogs_json = {
path = "${config.xdg.configHome}/discogs_token.json";
# path = "${config.home.homeDirectory}/${getEnv_name}";
};
};
programs.beets = {
enable = true;
settings = {