script: Various fixes

This commit is contained in:
Geoffrey Frogeye 2024-01-10 13:55:15 +01:00
parent 6e4130fd26
commit bf796d9587
Signed by: geoffrey
GPG key ID: C72403E7F82E6AD8
5 changed files with 12 additions and 11 deletions

View file

@ -137,11 +137,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1704318910, "lastModified": 1704741201,
"narHash": "sha256-wOIJwAsnZhM0NlFRwYJRgO4Lldh8j9viyzwQXtrbNtM=", "narHash": "sha256-Y420NeqPWRSpxHpXsxhKILfTxT5exjtTgCgDwSpcEfU=",
"owner": "nix-community", "owner": "nix-community",
"repo": "disko", "repo": "disko",
"rev": "aef9a509db64a081186af2dc185654d78dc8e344", "rev": "f0a3425a7b173701922e7959d8bfb136ef53aa54",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -334,11 +334,11 @@
}, },
"nixos-hardware": { "nixos-hardware": {
"locked": { "locked": {
"lastModified": 1704632650, "lastModified": 1704786394,
"narHash": "sha256-83J/nd/NoLqo3vj0S0Ppqe8L+ijIFiGL6HNDfCCUD/Q=", "narHash": "sha256-aJM0ln9fMGWw1+tjyl5JZWZ3ahxAA2gw2ZpZY/hkEMs=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixos-hardware", "repo": "nixos-hardware",
"rev": "c478b3d56969006e015e55aaece4931f3600c1b2", "rev": "b34a6075e9e298c4124e35c3ccaf2210c1f3a43b",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -337,7 +337,8 @@
sessionPath = [ sessionPath = [
"${config.home.homeDirectory}/.local/bin" "${config.home.homeDirectory}/.local/bin"
"${config.home.sessionVariables.GOPATH}" "${config.home.sessionVariables.GOPATH}"
(builtins.toString ./scripts) "${config.home.homeDirectory}/.config/dotfiles/hm/scripts" # Not Nix path otherwise it gets converted into store,
# and then every time you want to modify a script you have to rebuild and re-login...
]; ];
# TODO Way to automatically setup an home-manager install # TODO Way to automatically setup an home-manager install
}; };

View file

@ -158,8 +158,7 @@ do
echo Processing $music echo Processing $music
temp=$(mktemp --suffix .flac) temp=$(mktemp --suffix .flac)
cp "$music" "$temp" ffmpeg -y -i "$music" -compression_level 8 "$temp"
ffmpeg -8 -o "$temp"
echo "→ Optimize done" echo "→ Optimize done"
replace "$temp" "$music" replace "$temp" "$music"

View file

@ -1,8 +1,9 @@
#!/usr/bin/env nix-shell #!/usr/bin/env nix-shell
#! nix-shell -i python3 --pure #! nix-shell -i python3 --pure
#! nix-shell -p python3 python3Packages.coloredlogs python3Packages.r128gain #! nix-shell -p python3 python3Packages.coloredlogs r128gain
# TODO r128gain is not maintainted anymore # TODO r128gain is not maintainted anymore
# 24.05 rsgain replaces it, does the same job as I do with albums
# Normalisation is done at the default of each program, # Normalisation is done at the default of each program,
# which is usually -89.0 dB # which is usually -89.0 dB

View file

@ -1,6 +1,6 @@
#!/usr/bin/env nix-shell #!/usr/bin/env nix-shell
#! nix-shell -i python3 --pure #! nix-shell -i python3 --pure
#! nix-shell -p python3 python3Packages.coloredlogs python3Packages.progresbar2 ffmpeg #! nix-shell -p python3 python3Packages.coloredlogs python3Packages.progressbar2 ffmpeg
# pylint: disable=C0103 # pylint: disable=C0103
import logging import logging