From ad952f7225f17cfb10e7b43d219b50d5778a2b83 Mon Sep 17 00:00:00 2001 From: Jake Ginesin Date: Sat, 28 Jun 2025 22:08:14 -0400 Subject: [PATCH] 463 current 2025-06-28 22:07:32 25.05.20250424.f771eb4 6.12.24 * --- home/scripts/fullclip.sh | 20 ++++++++++++++++++++ system/networking/blockers.sh | 1 + system/services/dnsmasq/default.nix | 2 +- system/services/services.nix | 2 +- 4 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 home/scripts/fullclip.sh diff --git a/home/scripts/fullclip.sh b/home/scripts/fullclip.sh new file mode 100644 index 0000000..cc550be --- /dev/null +++ b/home/scripts/fullclip.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash + +tmpfile=$(mktemp) +trap 'rm -f "$tmpfile"' EXIT + +if (( $# == 0 )); then + printf 'usage: %s command [arg …] — or — %s "full pipeline"\n' "$0" "$0" >&2 + exit 1 +fi + +if (( $# == 1 )); then + bash -c "$1" >"$tmpfile" +else + "$@" >"$tmpfile" +fi + +data=$(cat "$tmpfile") +op="$*" +echo -e "\$ $op\n$data" | perl -p -e 'chomp if eof' | xclip -in -sel clip +rm "$tmpfile" diff --git a/system/networking/blockers.sh b/system/networking/blockers.sh index 9ee2922..31c1cac 100644 --- a/system/networking/blockers.sh +++ b/system/networking/blockers.sh @@ -1,3 +1,4 @@ +# websites i'd like to (automatically) block on certain wifi connections set -euo pipefail blacklist=( diff --git a/system/services/dnsmasq/default.nix b/system/services/dnsmasq/default.nix index b5ed4a2..b0c6b82 100644 --- a/system/services/dnsmasq/default.nix +++ b/system/services/dnsmasq/default.nix @@ -12,7 +12,7 @@ enable = true; resolveLocalQueries = true; settings = { - conf-dir = "/var/lib/dnsmasq/conf.d"; + conf-dir = "/var/lib/dnsmasq/conf.d"; # see ../networking/blockers.sh and ...../home/scripts/dns listen-address = "127.0.0.1"; resolv-file = "/dev/null"; # god fuck you fuck you fuck you tailscale + systemd-resolved + dnsmasq it took me *three hours* at 3am to get this one working server = ["1.1.1.1" "1.0.0.1"]; diff --git a/system/services/services.nix b/system/services/services.nix index ca33227..d103904 100644 --- a/system/services/services.nix +++ b/system/services/services.nix @@ -7,7 +7,7 @@ ./synaptics/default.nix ./tailscale/default.nix ./syncthing/default.nix - # ./resolved/default.nix + # ./resolved/default.nix (not enabled, in favor of dnsmasq) ./dnsmasq/default.nix ]; }