feat(update script): add gsr update

This commit is contained in:
matt1432 2023-12-09 20:29:33 -05:00
parent 903b1f5f53
commit e4424a97e6
5 changed files with 32 additions and 10 deletions

View file

@ -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 = "";

View file

@ -1,7 +1,4 @@
{
pkgs,
...
}: {
{pkgs, ...}: {
home.packages = [
(pkgs.writeShellScriptBin "lock" ''
ags -r 'Tablet.setLaptopMode()'

View file

@ -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

View file

@ -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}

View file

@ -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