From c1e56790c58aa82f962a10d96de5ae392a1f6804 Mon Sep 17 00:00:00 2001 From: blake Date: Sun, 12 Oct 2025 20:11:00 -0500 Subject: [PATCH] finallyy? --- bin/rebuild.sh | 28 +++++++++---------- .../services/audiobookshelf/default.nix | 7 +++-- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/bin/rebuild.sh b/bin/rebuild.sh index f2534dd..c602697 100755 --- a/bin/rebuild.sh +++ b/bin/rebuild.sh @@ -1,12 +1,12 @@ #!/usr/bin/env bash set -euo pipefail -echo "searching generations" +#echo "searching generations" # your hostname (flake target) hostname="$(hostname)" -old_gen=$(nixos-rebuild list-generations | grep current | awk '{print $1}') -gen=$((old_gen + 1)) -echo "gen $old_gen --> gen $gen" +#old_gen=$(nixos-rebuild list-generations | grep current | awk '{print $1}') +#gen=$((old_gen + 1)) +#echo "gen $old_gen --> gen $gen" timestamp=$(date '+%Y-%m-%d %H:%M:%S') nix_dir="$HOME/.nix" logfile="$nix_dir/.nixos-switch-log" @@ -15,9 +15,9 @@ logfile="$nix_dir/.nixos-switch-log" pushd "$nix_dir" >/dev/null # function to get current nixos generation -get_current_generation() { - nixos-rebuild list-generations -} +#get_current_generation() { +# nixos-rebuild list-generations +#} echo "diffs:" git diff @@ -30,13 +30,13 @@ if ! sudo nixos-rebuild switch --flake .#"$hostname" 2>&1 | tee "$logfile"; then echo "rebuild failed; exited with no commit" exit 1 fi -if sed -n '3p' flake.nix | grep -q '^# generation:'; then - # replace the comment on line 3 - sed -i "3s|^# generation:.*|# generation: $gen, timestamp: $timestamp|" flake.nix -else - # insert comment on line 3 - sed -i "3i# generation: $gen, timestamp: $timestamp" flake.nix -fi +#if sed -n '3p' flake.nix | grep -q '^# generation:'; then +# # replace the comment on line 3 +# sed -i "3s|^# generation:.*|# generation: $gen, timestamp: $timestamp|" flake.nix +#else +# # insert comment on line 3 +# sed -i "3i# generation: $gen, timestamp: $timestamp" flake.nix +#fi echo "committing..." git add $nix_dir git commit -m "$commit_msg" diff --git a/modules/homelab/services/audiobookshelf/default.nix b/modules/homelab/services/audiobookshelf/default.nix index ef9bc20..d020c36 100644 --- a/modules/homelab/services/audiobookshelf/default.nix +++ b/modules/homelab/services/audiobookshelf/default.nix @@ -80,9 +80,10 @@ in serverAliases = [ "abs.${homelab.public_domain}" ]; extraConfig = '' # tls ${sec."ssl_blakedheld_crt".path} ${sec."ssl_blakedheld_key".path} - reverse_proxy http://127.0.0.1:${toString cfg.port} - stream_timeout 24h - stream_close_delay 5m + reverse_proxy http://127.0.0.1:${toString cfg.port} { + stream_timeout 24h + stream_close_delay 5m + } ''; };