From e4424a97e6f7ae5df6e8f8b3324654b932a81f89 Mon Sep 17 00:00:00 2001 From: matt1432 Date: Sat, 9 Dec 2023 20:29:33 -0500 Subject: [PATCH] feat(update script): add gsr update --- devices/binto/modules/gpu-replay.nix | 4 ++-- home/swaylock.nix | 5 +---- modules/dolphin.nix | 10 +++++++--- modules/greetd/default.nix | 3 ++- updateSha.sh | 20 ++++++++++++++++++++ 5 files changed, 32 insertions(+), 10 deletions(-) diff --git a/devices/binto/modules/gpu-replay.nix b/devices/binto/modules/gpu-replay.nix index 1bda140d..e3116a6a 100644 --- a/devices/binto/modules/gpu-replay.nix +++ b/devices/binto/modules/gpu-replay.nix @@ -6,8 +6,8 @@ }: let gsr = pkgs.gpu-screen-recorder.overrideAttrs (o: { src = pkgs.fetchurl { - url = "https://dec05eba.com/snapshot/gpu-screen-recorder.git.r420.2f60f4c.tar.gz"; - hash = "sha256-1PVe9t+vud2XnVT+UlEHozq+OtOKo/8gggcmdbp1dj4="; + url = "https://dec05eba.com/snapshot/gpu-screen-recorder.git.r444.02ee8b8.tar.gz"; + hash = "sha256-RkHg2OpgaFrKhLa+sa6IMt0j/3wZ6OehSKmD/M63S5Q="; }; postPatch = ""; diff --git a/home/swaylock.nix b/home/swaylock.nix index 8b297cba..ff2be04b 100644 --- a/home/swaylock.nix +++ b/home/swaylock.nix @@ -1,7 +1,4 @@ -{ - pkgs, - ... -}: { +{pkgs, ...}: { home.packages = [ (pkgs.writeShellScriptBin "lock" '' ags -r 'Tablet.setLaptopMode()' diff --git a/modules/dolphin.nix b/modules/dolphin.nix index 369a9362..933719e4 100644 --- a/modules/dolphin.nix +++ b/modules/dolphin.nix @@ -1,10 +1,14 @@ -{config, pkgs, ...}: { +{ + config, + pkgs, + ... +}: { environment.systemPackages = with pkgs; [ plasma5Packages.kio-admin ]; - home-manager.users.${config.vars.user}.home.packages = - with pkgs; [] + home-manager.users.${config.vars.user}.home.packages = with pkgs; + [] ++ (with pkgs.plasma5Packages; [ ark kcharselect diff --git a/modules/greetd/default.nix b/modules/greetd/default.nix index 726a5a50..7b795ced 100644 --- a/modules/greetd/default.nix +++ b/modules/greetd/default.nix @@ -9,7 +9,8 @@ isNvidia = config.hardware.nvidia.modesetting.enable; isTouchscreen = config.hardware.sensor.iio.enable; - hyprland = config + hyprland = + config .home-manager .users .${config.vars.user} diff --git a/updateSha.sh b/updateSha.sh index 61748e7e..002bed03 100755 --- a/updateSha.sh +++ b/updateSha.sh @@ -37,11 +37,31 @@ updateFirefoxAddons() { mozilla-addons-to-nix addons.json generated-firefox-addons.nix) } +updateGSR() { + ( + cd /tmp || return + + git clone https://repo.dec05eba.com/gpu-screen-recorder + cd gpu-screen-recorder || return + + REV=$(printf "r%s.%s\n" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)") + URL=https://dec05eba.com/snapshot/gpu-screen-recorder.git."$REV".tar.gz + HASH="$(nix store prefetch-file --refresh --json \ + --hash-type sha256 $URL | jq -r .hash)" + + FILE="/home/matt/.nix/devices/binto/modules/gpu-replay.nix" + sed -i "s,url = .*,url = \"$URL\";," "$FILE" + sed -i "s,hash = .*,hash = \"$HASH\";," "$FILE" + ) +} + doAll() { updateFirefoxAddons + updateGSR } [[ "$1" == "-a" || "$1" == "--all" ]] && doAll [[ "$1" == "-f" || "$1" == "--firefox" ]] && updateFirefoxAddons +[[ "$1" == "-gsr" || "$1" == "--gpu-screen-recorder" ]] && updateGSR alejandra /home/matt/.nix