Compare commits

..

3 commits

Author SHA1 Message Date
0c0245a8b4
fix: use quad9 as DNS
private DNS inside of the tailnet breaks the connection occasionally
2024-12-19 12:58:20 +01:00
599a549540
chore: make use of ts injection 2024-12-19 12:57:41 +01:00
78e63a2044
feat: add beets 2024-12-19 12:57:31 +01:00
3 changed files with 51 additions and 38 deletions

View file

@ -1,28 +1,34 @@
{ pkgs, lib, ... }: { pkgs, lib, ... }:
let let
inherit (lib) concatStringsSep attrNames; inherit (lib) concatStringsSep listToAttrs;
plugins = { plugins = [
convert.enable = true; "convert"
chroma.enable = true; "chroma"
inline.enable = true; "inline"
fish.enable = true; "fish"
fetchart.enable = true; "fetchart"
lastgenre.enable = true; "lastgenre"
scrub.enable = true; "scrub"
duplicates.enable = true; "duplicates"
info.enable = true; "info"
missing.enable = true; "missing"
unimported.enable = true; "unimported"
}; "badfiles"
];
in in
{ {
config = { config = {
programs.beets = { programs.beets = {
package = pkgs.beets.override { package = pkgs.beets.override {
pluginOverrides = plugins; pluginOverrides = listToAttrs (
map (name: {
value.enable = true;
inherit name;
}) plugins
);
}; };
settings = { settings = {
plugins = concatStringsSep " " (attrNames plugins); plugins = concatStringsSep " " plugins;
per_disc_numbering = "yes"; per_disc_numbering = "yes";
asciify_paths = true; asciify_paths = true;
convert = { convert = {
@ -36,6 +42,7 @@ in
maxwidth = 500; maxwidth = 500;
minwidth = 500; minwidth = 500;
enforce_ratio = true; enforce_ratio = true;
high_resolution = true;
}; };
duplicates = { duplicates = {
count = true; count = true;
@ -61,7 +68,8 @@ in
}; };
item_fields = { item_fields = {
disc_and_track = "u'%02i.%02i' % (disc, track) if disctotal > 1 else u'%02i' % (track)"; disc_and_track = "u'%02i.%02i' % (disc, track) if disctotal > 1 else u'%02i' % (track)";
primary_albumartist = '' primary_albumartist = # python
''
if albumartist.lower().strip().startswith(albumartists[0].lower().strip()): if albumartist.lower().strip().startswith(albumartists[0].lower().strip()):
return albumartists[0] return albumartists[0]
else: else:

View file

@ -9,11 +9,14 @@ in
clip = "wl-copy"; clip = "wl-copy";
}; };
functions = { functions = {
gitignore = "curl -sL https://www.gitignore.io/api/$argv"; gitignore = # fish
mv-bad-creation-date = '' "curl -sL https://www.gitignore.io/api/$argv";
mv-bad-creation-date = # fish
''
${getExe' pkgs.exiftool "exiftool"} -if 'not $CreateDate' -p '$FileName' "$PWD/$argv[1]" | xargs -I {} mv -i "$PWD/$argv[1]/{}" "$argv[2]" ${getExe' pkgs.exiftool "exiftool"} -if 'not $CreateDate' -p '$FileName' "$PWD/$argv[1]" | xargs -I {} mv -i "$PWD/$argv[1]/{}" "$argv[2]"
''; '';
rename-images = '' rename-images = # fish
''
set -f input "$PWD/$argv[1]" set -f input "$PWD/$argv[1]"
if not test -d $input if not test -d $input
@ -23,7 +26,8 @@ in
end end
''; '';
fish_prompt = builtins.readFile ./fish_prompt.fish; fish_prompt = builtins.readFile ./fish_prompt.fish;
revert = '' revert = # fish
''
env --chdir $HOME/.nixconf sudo nixos-rebuild switch --flake .#$(hostname) --rollback env --chdir $HOME/.nixconf sudo nixos-rebuild switch --flake .#$(hostname) --rollback
''; '';
}; };

View file

@ -6,7 +6,8 @@
base_domain = "ts"; base_domain = "ts";
nameservers.global = [ nameservers.global = [
"100.64.0.4" #"100.64.0.4"
"9.9.9.9"
]; ];
extra_records = extra_records =