feat(update script): make func for every src

This commit is contained in:
matt1432 2023-12-13 19:23:34 -05:00
parent cce40e99d0
commit 7d6309897f
2 changed files with 18 additions and 8 deletions

View file

@ -14,12 +14,11 @@
}:
stdenv.mkDerivation rec {
pname = "pam-fprint-grosshack";
version = "v0.3.0";
src = fetchFromGitLab {
owner = "mishakmak";
repo = pname;
rev = version;
rev = "45b42524fb5783e1e555067743d7e0f70d27888a";
sha256 = "sha256-obczZbf/oH4xGaVvp3y3ZyDdYhZnxlCWvL0irgEYIi0=";
};

View file

@ -21,13 +21,11 @@ parseFetchurl() {
sed -i "s,sha256 = .*,sha256 = \"$HASH\";," "$FILE"
}
# TODO
# https://github.com/dasJ/spotifywm
#
# https://github.com/tio/input-emulator
# https://gitlab.com/mishakmak/pam-fprint-grosshack
# https://gitlab.com/phoneybadger/pokemon-colorscripts
updateOverlays() {
FILE="/home/matt/.nix/common/overlays"
parseNurl "https://github.com/dasJ/spotifywm" "$FILE/spotifywm/spotifywm.nix"
}
updateDracula() {
FILE="/home/matt/.nix/common/overlays/dracula-theme"
@ -39,6 +37,13 @@ updateDracula() {
parseFetchurl "https://github.com/aynp/dracula-wallpapers/blob/main/Art/4k/Waves%201.png?raw=true" "$FILE/wallpaper.nix"
}
updateCustomPkgs() {
FILE="/home/matt/.nix/common/pkgs"
parseNurl "https://github.com/tio/input-emulator" "$FILE/input-emulator/default.nix"
parseNurl "https://gitlab.com/mishakmak/pam-fprint-grosshack" "$FILE/pam-fprint-grosshack/default.nix"
parseNurl "https://gitlab.com/phoneybadger/pokemon-colorscripts" "$FILE/pokemon-colorscripts/default.nix"
}
updateFFZ() {
FILE="/home/matt/.nix/home/firefox/addons/default.nix"
URL="https://cdn.frankerfacez.com/script/frankerfacez-4.0-an+fx.xpi"
@ -80,15 +85,21 @@ updateGSR() {
)
}
doAll() {
updateFFZ
updateCustomPkgs
updateOverlays
updateDracula
updateFirefoxAddons
updateGSR
}
[[ "$1" == "-a" || "$1" == "--all" ]] && doAll
[[ "$1" == "-d" || "$1" == "--dracula" ]] && updateDracula
[[ "$1" == "-c" || "$1" == "--custom" ]] && updateCustomPkgs
[[ "$1" == "-o" || "$1" == "--overlays" ]] && updateOverlays
[[ "$1" == "-f" || "$1" == "--firefox" ]] && updateFirefoxAddons
[[ "$1" == "-ffz" || "$1" == "--frankerfacez" ]] && updateFFZ
[[ "$1" == "-gsr" || "$1" == "--gpu-screen-recorder" ]] && updateGSR