misc fixes, some new features
authorIan Kelling <ian@iankelling.org>
Tue, 31 Mar 2026 21:04:05 +0000 (17:04 -0400)
committerIan Kelling <ian@iankelling.org>
Tue, 31 Mar 2026 21:04:05 +0000 (17:04 -0400)
19 files changed:
.sqliterc [new file with mode: 0644]
brc2
distro-end
filesystem/etc/btrbk/ianktemplate.conf [new file with mode: 0644]
filesystem/etc/default/prometheus-node-exporter [new file with mode: 0644]
filesystem/etc/sysctl.d/iank.conf [new file with mode: 0644]
filesystem/usr/local/bin/bat [new file with mode: 0755]
filesystem/usr/local/bin/prof-tmux-attach [new file with mode: 0755]
filesystem/usr/local/bin/wghole-check [new file with mode: 0755]
machine_specific/frodo/filesystem/etc/btrbk/root.conf [new file with mode: 0644]
machine_specific/frodo/filesystem/etc/mdadm/mdadm.conf [new file with mode: 0644]
machine_specific/frodo/filesystem/etc/systemd/system/btrbkroot.service [new file with mode: 0644]
machine_specific/frodo/filesystem/etc/systemd/system/btrbkroot.timer [new file with mode: 0644]
machine_specific/frodo/subdir_files/.config/systemd/user/profanity.service.d/frodo.conf [new file with mode: 0644]
subdir_files/.config/bat/config [new file with mode: 0644]
subdir_files/.config/konsolerc
subdir_files/.config/systemd/user/profanity.service
subdir_files/.local/share/kxmlgui5/konsole/sessionui.rc
znc-start-delay

diff --git a/.sqliterc b/.sqliterc
new file mode 100644 (file)
index 0000000..6f7d58d
--- /dev/null
+++ b/.sqliterc
@@ -0,0 +1 @@
+.timeout 6000
diff --git a/brc2 b/brc2
index 07a4c7f6eab9513455e747a6314a43e317ef652c..d262054976bab48fdcfc35767485980d8f02d4df 100644 (file)
--- a/brc2
+++ b/brc2
@@ -5059,3 +5059,16 @@ mnt-df() {
   local mnts=$(for f in *; do if mountpoint -q $f; then e $f; fi; done)
   df -h $mnts  | awk '{printf "%8s %12s\n", $4,$NF}' | sort -hr
 }
+
+lazywrites() {
+  local t=$(mktemp)
+  cat >$t <<'EOF'
+fs.xfs.xfssyncd_centisecs=13000
+vm.dirty_background_ratio=25
+vm.dirty_ratio=50
+vm.dirty_expire_centisecs=13000
+vm.dirty_writeback_centisecs=1500
+EOF
+  s sysctl -p$t
+
+  }
index eb3826b7d9f5b4baced314c5240b05a3d1a384bd..9ccc8566168250efdee1dc7208e76257320a8376 100755 (executable)
@@ -1588,7 +1588,7 @@ soff libvirt-guests
 for x in iank user2; do s usermod -aG libvirt,kvm,libvirt-qemu $x; done
 
 
-pi --no-install-recommends kdeconnect
+pi --no-install-recommends kdeconnect epiphany-browser
 
 
 ### begin model 01 arduino support ###
diff --git a/filesystem/etc/btrbk/ianktemplate.conf b/filesystem/etc/btrbk/ianktemplate.conf
new file mode 100644 (file)
index 0000000..3ad4b04
--- /dev/null
@@ -0,0 +1,28 @@
+# Note: for unrestricted root ssh, -F /root/.ssh/confighome
+ssh_identity /q/root/h
+lockfile                   /var/lock/btrbk-adhoc1.lock
+timestamp_format long-iso
+snapshot_create no
+snapshot_preserve 36h 14d 8w 24m
+snapshot_preserve_min all
+snapshot_dir btrbk
+target_preserve 36h 14d 8w 24m
+target_preserve_min all
+incremental_prefs sao:1
+rate_limit no
+send_protocol 2
+send_compressed_data yes
+# for 10g lan link speed boost:
+# ssh_cipher_spec none
+stream_buffer 500m
+
+volume /mnt/r4
+subvolume m6
+target send-receive /mnt/r3/btrbk
+target send-receive ssh://kd.b8.nz/mnt/root/btrbk
+subvolume m7
+target send-receive /mnt/r3/btrbk
+target send-receive ssh://kd.b8.nz/mnt/root/btrbk
+
+# useful:
+# printf 'subvolume di%s\ntarget send-receive /mnt/nu4/btrbk\n' {a..t}
diff --git a/filesystem/etc/default/prometheus-node-exporter b/filesystem/etc/default/prometheus-node-exporter
new file mode 100644 (file)
index 0000000..33e624a
--- /dev/null
@@ -0,0 +1,280 @@
+# disable all optional collectors
+ARGS="--collector.disable-defaults
+--no-collector.interrupts.include-zeros
+--collector.filesystem.mount-points-include=/
+--collector.netdev.device-include=eth0"
+
+# prometheus-node-exporter --help
+# usage: prometheus-node-exporter [<flags>]
+
+# Flags:
+#   -h, --[no-]help                Show context-sensitive help (also try --help-long and --help-man).
+#       --collector.arp.device-include=COLLECTOR.ARP.DEVICE-INCLUDE
+#                                  Regexp of arp devices to include (mutually exclusive to device-exclude).
+#       --collector.arp.device-exclude=COLLECTOR.ARP.DEVICE-EXCLUDE
+#                                  Regexp of arp devices to exclude (mutually exclusive to device-include).
+#       --[no-]collector.arp.netlink
+#                                  Use netlink to gather stats instead of /proc/net/arp.
+#       --[no-]collector.bcache.priorityStats
+#                                  Expose expensive priority stats.
+#       --[no-]collector.cpu.guest
+#                                  Enables metric node_cpu_guest_seconds_total
+#       --[no-]collector.cpu.info  Enables metric cpu_info
+#       --collector.cpu.info.flags-include=COLLECTOR.CPU.INFO.FLAGS-INCLUDE
+#                                  Filter the `flags` field in cpuInfo with a value that must be a regular expression
+#       --collector.cpu.info.bugs-include=COLLECTOR.CPU.INFO.BUGS-INCLUDE
+#                                  Filter the `bugs` field in cpuInfo with a value that must be a regular expression
+#       --collector.diskstats.device-exclude="^(z?ram|loop|fd|(h|s|v|xv)d[a-z]|nvme\\d+n\\d+p)\\d+$"
+#                                  Regexp of diskstats devices to exclude (mutually exclusive to device-include).
+#       --collector.diskstats.device-include=COLLECTOR.DISKSTATS.DEVICE-INCLUDE
+#                                  Regexp of diskstats devices to include (mutually exclusive to device-exclude).
+#       --collector.ethtool.device-include=COLLECTOR.ETHTOOL.DEVICE-INCLUDE
+#                                  Regexp of ethtool devices to include (mutually exclusive to device-exclude).
+#       --collector.ethtool.device-exclude=COLLECTOR.ETHTOOL.DEVICE-EXCLUDE
+#                                  Regexp of ethtool devices to exclude (mutually exclusive to device-include).
+#       --collector.ethtool.metrics-include=".*"
+#                                  Regexp of ethtool stats to include.
+#       --collector.filesystem.mount-points-exclude="^/(dev|proc|run/credentials/.+|sys|var/lib/docker/.+|var/lib/containers/storage/.+)($|/)"
+#                                  Regexp of mount points to exclude for filesystem collector. (mutually exclusive to
+#                                  mount-points-include)
+#       --collector.filesystem.mount-points-include=COLLECTOR.FILESYSTEM.MOUNT-POINTS-INCLUDE
+#                                  Regexp of mount points to include for filesystem collector. (mutually exclusive to
+#                                  mount-points-exclude)
+#       --collector.filesystem.fs-types-exclude="^(autofs|binfmt_misc|bpf|cgroup2?|configfs|debugfs|devpts|devtmpfs|fusectl|hugetlbfs|iso9660|mqueue|nsfs|overlay|proc|procfs|pstore|rpc_pipefs|securityfs|selinuxfs|squashfs|erofs|sysfs|tracefs)$"
+#                                  Regexp of filesystem types to exclude for filesystem collector. (mutually exclusive to
+#                                  fs-types-include)
+#       --collector.filesystem.fs-types-include=COLLECTOR.FILESYSTEM.FS-TYPES-INCLUDE
+#                                  Regexp of filesystem types to exclude for filesystem collector. (mutually exclusive to
+#                                  fs-types-exclude)
+#       --collector.hwmon.chip-include=COLLECTOR.HWMON.CHIP-INCLUDE
+#                                  Regexp of hwmon chip to include (mutually exclusive to device-exclude).
+#       --collector.hwmon.chip-exclude=COLLECTOR.HWMON.CHIP-EXCLUDE
+#                                  Regexp of hwmon chip to exclude (mutually exclusive to device-include).
+#       --collector.hwmon.sensor-include=COLLECTOR.HWMON.SENSOR-INCLUDE
+#                                  Regexp of hwmon sensor to include (mutually exclusive to sensor-exclude).
+#       --collector.hwmon.sensor-exclude=COLLECTOR.HWMON.SENSOR-EXCLUDE
+#                                  Regexp of hwmon sensor to exclude (mutually exclusive to sensor-include).
+#       --collector.interrupts.name-include=COLLECTOR.INTERRUPTS.NAME-INCLUDE
+#                                  Regexp of interrupts name to include (mutually exclusive to
+#                                  --collector.interrupts.name-exclude).
+#       --collector.interrupts.name-exclude=COLLECTOR.INTERRUPTS.NAME-EXCLUDE
+#                                  Regexp of interrupts name to exclude (mutually exclusive to
+#                                  --collector.interrupts.name-include).
+#       --[no-]collector.interrupts.include-zeros
+#                                  Include interrupts that have a zero value
+#       --collector.ipvs.backend-labels="local_address,local_port,remote_address,remote_port,proto,local_mark"
+#                                  Comma separated list for IPVS backend stats labels.
+#       --collector.netclass.ignored-devices="^$"
+#                                  Regexp of net devices to ignore for netclass collector.
+#       --[no-]collector.netclass.ignore-invalid-speed
+#                                  Ignore devices where the speed is invalid. This will be the default behavior in 2.x.
+#       --[no-]collector.netclass.netlink
+#                                  Use netlink to gather stats instead of /proc/net/dev.
+#       --[no-]collector.netclass_rtnl.with-stats
+#                                  Expose the statistics for each network device, replacing netdev collector.
+#       --collector.netdev.device-include=COLLECTOR.NETDEV.DEVICE-INCLUDE
+#                                  Regexp of net devices to include (mutually exclusive to device-exclude).
+#       --collector.netdev.device-exclude=COLLECTOR.NETDEV.DEVICE-EXCLUDE
+#                                  Regexp of net devices to exclude (mutually exclusive to device-include).
+#       --[no-]collector.netdev.address-info
+#                                  Collect address-info for every device
+#       --[no-]collector.netdev.enable-detailed-metrics
+#                                  Use (incompatible) metric names that provide more detailed stats on Linux
+#       --[no-]collector.netdev.netlink
+#                                  Use netlink to gather stats instead of /proc/net/dev.
+#       --[no-]collector.netdev.label-ifalias
+#                                  Add ifAlias label
+#       --collector.netstat.fields="^(.*_(InErrors|InErrs)|Ip_Forwarding|Ip(6|Ext)_(InOctets|OutOctets)|Icmp6?_(InMsgs|OutMsgs)|TcpExt_(Listen.*|Syncookies.*|TCPSynRetrans|TCPTimeouts|TCPOFOQueue|TCPRcvQDrop)|Tcp_(ActiveOpens|InSegs|OutSegs|OutRsts|PassiveOpens|RetransSegs|CurrEstab)|Udp6?_(InDatagrams|OutDatagrams|NoPorts|RcvbufErrors|SndbufErrors))$"
+#                                  Regexp of fields to return for netstat collector.
+#       --collector.ntp.server="127.0.0.1"
+#                                  NTP server to use for ntp collector
+#       --collector.ntp.server-port=123
+#                                  UDP port number to connect to on NTP server
+#       --collector.ntp.protocol-version=4
+#                                  NTP protocol version
+#       --[no-]collector.ntp.server-is-local
+#                                  Certify that collector.ntp.server address is not a public ntp server
+#       --collector.ntp.ip-ttl=1   IP TTL to use while sending NTP query
+#       --collector.ntp.max-distance=3.46608s
+#                                  Max accumulated distance to the root
+#       --collector.ntp.local-offset-tolerance=1ms
+#                                  Offset between local clock and local ntpd time to tolerate
+#       --path.procfs="/proc"      procfs mountpoint.
+#       --path.sysfs="/sys"        sysfs mountpoint.
+#       --path.rootfs="/"          rootfs mountpoint.
+#       --path.udev.data="/run/udev/data"
+#                                  udev data path.
+#       --collector.pcidevice.idsfile=COLLECTOR.PCIDEVICE.IDSFILE
+#                                  Path to pci.ids file to use for PCI device identification.
+#       --[no-]collector.pcidevice.names
+#                                  Enable PCI device name resolution (requires pci.ids file).
+#       --collector.perf.cpus=""   List of CPUs from which perf metrics should be collected
+#       --collector.perf.tracepoint=COLLECTOR.PERF.TRACEPOINT ...
+#                                  perf tracepoint that should be collected
+#       --[no-]collector.perf.disable-hardware-profilers
+#                                  disable perf hardware profilers
+#       --collector.perf.hardware-profilers=COLLECTOR.PERF.HARDWARE-PROFILERS ...
+#                                  perf hardware profilers that should be collected
+#       --[no-]collector.perf.disable-software-profilers
+#                                  disable perf software profilers
+#       --collector.perf.software-profilers=COLLECTOR.PERF.SOFTWARE-PROFILERS ...
+#                                  perf software profilers that should be collected
+#       --[no-]collector.perf.disable-cache-profilers
+#                                  disable perf cache profilers
+#       --collector.perf.cache-profilers=COLLECTOR.PERF.CACHE-PROFILERS ...
+#                                  perf cache profilers that should be collected
+#       --collector.powersupply.ignored-supplies="^$"
+#                                  Regexp of power supplies to ignore for powersupplyclass collector.
+#       --collector.qdisc.fixtures=""
+#                                  test fixtures to use for qdisc collector end-to-end testing
+#       --collector.qdisc.device-include=COLLECTOR.QDISC.DEVICE-INCLUDE
+#                                  Regexp of qdisc devices to include (mutually exclusive to device-exclude).
+#       --collector.qdisc.device-exclude=COLLECTOR.QDISC.DEVICE-EXCLUDE
+#                                  Regexp of qdisc devices to exclude (mutually exclusive to device-include).
+#       --[no-]collector.rapl.enable-zone-label
+#                                  Enables service unit metric unit_start_time_seconds
+#       --collector.runit.servicedir="/etc/service"
+#                                  Path to runit service directory.
+#       --collector.slabinfo.slabs-include=".*"
+#                                  Regexp of slabs to include in slabinfo collector.
+#       --collector.slabinfo.slabs-exclude=""
+#                                  Regexp of slabs to exclude in slabinfo collector.
+#       --[no-]collector.stat.softirq
+#                                  Export softirq calls per vector
+#       --collector.supervisord.url="http://localhost:9001/RPC2"
+#                                  XML RPC endpoint. ($SUPERVISORD_URL)
+#       --collector.sysctl.include=COLLECTOR.SYSCTL.INCLUDE ...
+#                                  Select sysctl metrics to include
+#       --collector.sysctl.include-info=COLLECTOR.SYSCTL.INCLUDE-INFO ...
+#                                  Select sysctl metrics to include as info metrics
+#       --collector.systemd.unit-include=".+"
+#                                  Regexp of systemd units to include. Units must both match include and not match exclude to
+#                                  be included.
+#       --collector.systemd.unit-exclude=".+\\.(automount|device|mount|scope|slice)"
+#                                  Regexp of systemd units to exclude. Units must both match include and not match exclude to
+#                                  be included.
+#       --[no-]collector.systemd.enable-task-metrics
+#                                  Enables service unit tasks metrics unit_tasks_current and unit_tasks_max
+#       --[no-]collector.systemd.enable-restarts-metrics
+#                                  Enables service unit metric service_restart_total
+#       --[no-]collector.systemd.enable-start-time-metrics
+#                                  Enables service unit metric unit_start_time_seconds
+#       --collector.tapestats.ignored-devices="^$"
+#                                  Regexp of devices to ignore for tapestats.
+#       --collector.textfile.directory= ...
+#                                  Directory to read text files with metrics from, supports glob matching. (repeatable)
+#       --collector.vmstat.fields="^(oom_kill|pgpg|pswp|pg.*fault).*"
+#                                  Regexp of fields to return for vmstat collector.
+#       --collector.wifi.fixtures=""
+#                                  test fixtures to use for wifi collector metrics
+#       --[no-]collector.arp       Enable the arp collector (default: enabled).
+#       --[no-]collector.bcache    Enable the bcache collector (default: enabled).
+#       --[no-]collector.bonding   Enable the bonding collector (default: enabled).
+#       --[no-]collector.btrfs     Enable the btrfs collector (default: enabled).
+#       --[no-]collector.buddyinfo
+#                                  Enable the buddyinfo collector (default: disabled).
+#       --[no-]collector.cgroups   Enable the cgroups collector (default: disabled).
+#       --[no-]collector.conntrack
+#                                  Enable the conntrack collector (default: enabled).
+#       --[no-]collector.cpu       Enable the cpu collector (default: enabled).
+#       --[no-]collector.cpu_vulnerabilities
+#                                  Enable the cpu_vulnerabilities collector (default: disabled).
+#       --[no-]collector.cpufreq   Enable the cpufreq collector (default: enabled).
+#       --[no-]collector.diskstats
+#                                  Enable the diskstats collector (default: enabled).
+#       --[no-]collector.dmi       Enable the dmi collector (default: enabled).
+#       --[no-]collector.drbd      Enable the drbd collector (default: disabled).
+#       --[no-]collector.drm       Enable the drm collector (default: disabled).
+#       --[no-]collector.edac      Enable the edac collector (default: enabled).
+#       --[no-]collector.entropy   Enable the entropy collector (default: enabled).
+#       --[no-]collector.ethtool   Enable the ethtool collector (default: disabled).
+#       --[no-]collector.fibrechannel
+#                                  Enable the fibrechannel collector (default: enabled).
+#       --[no-]collector.filefd    Enable the filefd collector (default: enabled).
+#       --[no-]collector.filesystem
+#                                  Enable the filesystem collector (default: enabled).
+#       --[no-]collector.hwmon     Enable the hwmon collector (default: enabled).
+#       --[no-]collector.infiniband
+#                                  Enable the infiniband collector (default: enabled).
+#       --[no-]collector.interrupts
+#                                  Enable the interrupts collector (default: disabled).
+#       --[no-]collector.ipvs      Enable the ipvs collector (default: enabled).
+#       --[no-]collector.ksmd      Enable the ksmd collector (default: disabled).
+#       --[no-]collector.lnstat    Enable the lnstat collector (default: disabled).
+#       --[no-]collector.loadavg   Enable the loadavg collector (default: enabled).
+#       --[no-]collector.logind    Enable the logind collector (default: disabled).
+#       --[no-]collector.mdadm     Enable the mdadm collector (default: enabled).
+#       --[no-]collector.meminfo   Enable the meminfo collector (default: enabled).
+#       --[no-]collector.meminfo_numa
+#                                  Enable the meminfo_numa collector (default: disabled).
+#       --[no-]collector.mountstats
+#                                  Enable the mountstats collector (default: disabled).
+#       --[no-]collector.netclass  Enable the netclass collector (default: enabled).
+#       --[no-]collector.netdev    Enable the netdev collector (default: enabled).
+#       --[no-]collector.netstat   Enable the netstat collector (default: enabled).
+#       --[no-]collector.network_route
+#                                  Enable the network_route collector (default: disabled).
+#       --[no-]collector.nfs       Enable the nfs collector (default: enabled).
+#       --[no-]collector.nfsd      Enable the nfsd collector (default: enabled).
+#       --[no-]collector.ntp       Enable the ntp collector (default: disabled).
+#       --[no-]collector.nvme      Enable the nvme collector (default: enabled).
+#       --[no-]collector.os        Enable the os collector (default: enabled).
+#       --[no-]collector.pcidevice
+#                                  Enable the pcidevice collector (default: disabled).
+#       --[no-]collector.perf      Enable the perf collector (default: disabled).
+#       --[no-]collector.powersupplyclass
+#                                  Enable the powersupplyclass collector (default: enabled).
+#       --[no-]collector.pressure  Enable the pressure collector (default: enabled).
+#       --[no-]collector.processes
+#                                  Enable the processes collector (default: disabled).
+#       --[no-]collector.qdisc     Enable the qdisc collector (default: disabled).
+#       --[no-]collector.rapl      Enable the rapl collector (default: enabled).
+#       --[no-]collector.runit     Enable the runit collector (default: disabled).
+#       --[no-]collector.schedstat
+#                                  Enable the schedstat collector (default: enabled).
+#       --[no-]collector.selinux   Enable the selinux collector (default: enabled).
+#       --[no-]collector.slabinfo  Enable the slabinfo collector (default: disabled).
+#       --[no-]collector.sockstat  Enable the sockstat collector (default: enabled).
+#       --[no-]collector.softirqs  Enable the softirqs collector (default: disabled).
+#       --[no-]collector.softnet   Enable the softnet collector (default: enabled).
+#       --[no-]collector.stat      Enable the stat collector (default: enabled).
+#       --[no-]collector.supervisord
+#                                  Enable the supervisord collector (default: disabled).
+#       --[no-]collector.swap      Enable the swap collector (default: disabled).
+#       --[no-]collector.sysctl    Enable the sysctl collector (default: disabled).
+#       --[no-]collector.systemd   Enable the systemd collector (default: disabled).
+#       --[no-]collector.tapestats
+#                                  Enable the tapestats collector (default: enabled).
+#       --[no-]collector.tcpstat   Enable the tcpstat collector (default: disabled).
+#       --[no-]collector.textfile  Enable the textfile collector (default: enabled).
+#       --[no-]collector.thermal_zone
+#                                  Enable the thermal_zone collector (default: enabled).
+#       --[no-]collector.time      Enable the time collector (default: enabled).
+#       --[no-]collector.timex     Enable the timex collector (default: enabled).
+#       --[no-]collector.udp_queues
+#                                  Enable the udp_queues collector (default: enabled).
+#       --[no-]collector.uname     Enable the uname collector (default: enabled).
+#       --[no-]collector.vmstat    Enable the vmstat collector (default: enabled).
+#       --[no-]collector.watchdog  Enable the watchdog collector (default: enabled).
+#       --[no-]collector.wifi      Enable the wifi collector (default: disabled).
+#       --[no-]collector.xfrm      Enable the xfrm collector (default: disabled).
+#       --[no-]collector.xfs       Enable the xfs collector (default: enabled).
+#       --[no-]collector.zfs       Enable the zfs collector (default: enabled).
+#       --[no-]collector.zoneinfo  Enable the zoneinfo collector (default: disabled).
+#       --web.telemetry-path="/metrics"
+#                                  Path under which to expose metrics.
+#       --[no-]web.disable-exporter-metrics
+#                                  Exclude metrics about the exporter itself (promhttp_*, process_*, go_*).
+#       --web.max-requests=40      Maximum number of parallel scrape requests. Use 0 to disable.
+#       --[no-]collector.disable-defaults
+#                                  Set all collectors to disabled by default.
+#       --runtime.gomaxprocs=1     The target number of CPUs Go will run on (GOMAXPROCS) ($GOMAXPROCS)
+#       --[no-]web.systemd-socket  Use systemd socket activation listeners instead of port listeners (Linux only).
+#       --web.listen-address=:9100 ...
+#                                  Addresses on which to expose metrics and web interface. Repeatable for multiple addresses.
+#                                  Examples: `:9100` or `[::1]:9100` for http, `vsock://:9100` for vsock
+#       --web.config.file=""       Path to configuration file that can enable TLS or authentication. See:
+#                                  https://github.com/prometheus/exporter-toolkit/blob/master/docs/web-configuration.md
+#       --log.level=info           Only log messages with the given severity or above. One of: [debug, info, warn, error]
+#       --log.format=logfmt        Output format of log messages. One of: [logfmt, json]
+#       --[no-]version             Show application version.
diff --git a/filesystem/etc/sysctl.d/iank.conf b/filesystem/etc/sysctl.d/iank.conf
new file mode 100644 (file)
index 0000000..6442b2e
--- /dev/null
@@ -0,0 +1,4 @@
+# misc settings
+
+# default is 120 and gets hit a lot with heavy io.
+kernel.hung_task_timeout_secs=600
diff --git a/filesystem/usr/local/bin/bat b/filesystem/usr/local/bin/bat
new file mode 100755 (executable)
index 0000000..486292d
--- /dev/null
@@ -0,0 +1,23 @@
+#!/bin/bash
+# I, Ian Kelling, follow the GNU license recommendations at
+# https://www.gnu.org/licenses/license-recommendations.en.html. They
+# recommend that small programs, < 300 lines, be licensed under the
+# Apache License 2.0. This file contains or is part of one or more small
+# programs. If a small program grows beyond 300 lines, I plan to change
+# to a recommended GPL license.
+
+# Copyright 2025 Ian Kelling
+
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+
+#     http://www.apache.org/licenses/LICENSE-2.0
+
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+batcat "$@"
diff --git a/filesystem/usr/local/bin/prof-tmux-attach b/filesystem/usr/local/bin/prof-tmux-attach
new file mode 100755 (executable)
index 0000000..0ab3dcc
--- /dev/null
@@ -0,0 +1,59 @@
+#!/bin/bash
+# I, Ian Kelling, follow the GNU license recommendations at
+# https://www.gnu.org/licenses/license-recommendations.en.html. They
+# recommend that small programs, < 300 lines, be licensed under the
+# Apache License 2.0. This file contains or is part of one or more small
+# programs. If a small program grows beyond 300 lines, I plan to switch
+# its license to GPL.
+
+# Copyright 2024 Ian Kelling
+
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+
+#     http://www.apache.org/licenses/LICENSE-2.0
+
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+
+
+set -e; . /usr/local/lib/bash-bear; set +e
+
+source /p/c/domain-info
+
+
+if systemctl --user --quiet is-active profanity || [[ $HOSTNAME == "$d_host" ]]; then
+  # local connection.
+  tmux -L profanity a
+  exit 0
+fi
+## remainder of script is in the case of a remote connection
+
+
+fastcon=0
+while true; do
+  start=$EPOCHSECONDS
+  if ! ssh-add -l | grep SHA256:YEhwH5u+wkqkSl/dCq8rFebi2qz7Os3RmIWPxMg13eA &>/dev/null; then
+    ssh -n prof
+  fi
+  ssh -l iank -t prof tmux -L profanity a ||:
+  if (( EPOCHSECONDS > start + 600 )); then
+    fastcon=0
+  fi
+  # we try to reconnect quickly for a while (just once as I write this),
+  # then try to reconnect slowly.
+  if (( fastcon < 1 )); then
+    echo "waiting 10. any key to cancel"
+    read -rsN1 -t 10 ||:
+    fastcon=$((fastcon+1))
+  else
+    echo "waiting 120. any key to cancel"
+    # like sleep but stop on any input
+    read -rsN1 -t 120 ||:
+  fi
+done
diff --git a/filesystem/usr/local/bin/wghole-check b/filesystem/usr/local/bin/wghole-check
new file mode 100755 (executable)
index 0000000..086aeb1
--- /dev/null
@@ -0,0 +1,49 @@
+#!/bin/bash
+# I, Ian Kelling, follow the GNU license recommendations at
+# https://www.gnu.org/licenses/license-recommendations.en.html. They
+# recommend that small programs, < 300 lines, be licensed under the
+# Apache License 2.0. This file contains or is part of one or more small
+# programs. If a small program grows beyond 300 lines, I plan to change
+# to a recommended GPL license.
+
+# Copyright 2025 Ian Kelling
+
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+
+#     http://www.apache.org/licenses/LICENSE-2.0
+
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+### Checks if wghole is missing its ip address and other conditions
+
+
+[[ $EUID == 0 ]] || exec sudo -E "${BASH_SOURCE[0]}" "$@"
+
+. /usr/local/lib/fsf-script-lib
+
+
+needs-restart() {
+  ip_out=$(ip a show dev wghole 2>/dev/null) || exit 0
+  if printf "%s\n" "$ip_out" | grep -Fq 10.8.0; then
+    exit 0
+  fi
+  if ! curl -s 72.14.176.105 &>/dev/null; then
+    exit 0
+  fi
+  if ! systemctl is-active wg-quick@wghole | grep -Fxq active; then
+    exit 0
+  fi
+}
+
+needs-restart
+# Sleep and recheck should be good enough to beavoid a race condition
+# with another instance restarting.
+sleep  $(( 3 + ( RANDOM % 5 ) ))
+needs-restart
+systemctl restart wg-quick@wghole.service
diff --git a/machine_specific/frodo/filesystem/etc/btrbk/root.conf b/machine_specific/frodo/filesystem/etc/btrbk/root.conf
new file mode 100644 (file)
index 0000000..b48b877
--- /dev/null
@@ -0,0 +1,24 @@
+transaction_syslog local7
+
+lockfile                   /var/lock/btrbk-root.lock
+
+timestamp_format long-iso
+
+snapshot_create onchange
+
+snapshot_preserve 18h 14d 8w 12m
+snapshot_preserve_min 2d
+snapshot_dir btrbk
+
+target_preserve 18h 14d 8w 12m
+target_preserve_min 2d
+
+rate_limit no
+volume /mnt/root
+
+# a & q are handled separately by btrbk-run & btrbk.timer
+
+subvolume m0
+subvolume m1
+subvolume m2
+subvolume ro2
diff --git a/machine_specific/frodo/filesystem/etc/mdadm/mdadm.conf b/machine_specific/frodo/filesystem/etc/mdadm/mdadm.conf
new file mode 100644 (file)
index 0000000..52d5ab5
--- /dev/null
@@ -0,0 +1,4 @@
+ARRAY /dev/md/pg1 level=raid0 num-devices=4 metadata=1.2 UUID=3bab0b4d:ad7a3136:c75fde32:f4373de1
+   devices=/dev/dm-16,/dev/dm-22,/dev/dm-5,/dev/dm-7
+ARRAY /dev/md/ndi level=raid0 num-devices=4 metadata=1.2 UUID=693bf056:3875b2bb:7794738b:98914a2c
+   #devices=/dev/mapper/int-vgnvme-WD_BLACK_SN850P_for_PS5_8000GB_24517P800200-ndi,/dev/mapper/int-vgnvme-WD_BLACK_SN850X_8000GB_245244802091-ndi,/dev/mapper/int-vgnvme-WD_BLACK_SN850X_8000GB_245244802317-ndi,/dev/mapper/int-vgnvme-WD_BLACK_SN850X_8000GB_25026Y802189-ndi
diff --git a/machine_specific/frodo/filesystem/etc/systemd/system/btrbkroot.service b/machine_specific/frodo/filesystem/etc/systemd/system/btrbkroot.service
new file mode 100644 (file)
index 0000000..7473146
--- /dev/null
@@ -0,0 +1,7 @@
+[Unit]
+Description=Btrbk to root
+After=multi-user.target
+
+[Service]
+Type=oneshot
+ExecStart=/usr/local/bin/sysd-mail-once btrbkroot btrbk -c /etc/btrbk/root.conf run
diff --git a/machine_specific/frodo/filesystem/etc/systemd/system/btrbkroot.timer b/machine_specific/frodo/filesystem/etc/systemd/system/btrbkroot.timer
new file mode 100644 (file)
index 0000000..afab97c
--- /dev/null
@@ -0,0 +1,8 @@
+[Unit]
+Description=Btrbk root timer
+
+[Timer]
+OnCalendar=*-*-* 13:00:00 America/New_York
+
+[Install]
+WantedBy=timers.target
diff --git a/machine_specific/frodo/subdir_files/.config/systemd/user/profanity.service.d/frodo.conf b/machine_specific/frodo/subdir_files/.config/systemd/user/profanity.service.d/frodo.conf
new file mode 100644 (file)
index 0000000..1c9c2a4
--- /dev/null
@@ -0,0 +1,2 @@
+[Unit]
+AssertPathExists=/d/p/profanity
diff --git a/subdir_files/.config/bat/config b/subdir_files/.config/bat/config
new file mode 100644 (file)
index 0000000..11df923
--- /dev/null
@@ -0,0 +1,28 @@
+# This is `bat`s configuration file. Each line either contains a comment or
+# a command-line option that you want to pass to `bat` by default. You can
+# run `bat --help` to get a list of all possible configuration options.
+
+# Specify desired highlighting theme (e.g. "TwoDark"). Run `bat --list-themes`
+# for a list of all available themes
+#--theme="TwoDark"
+
+# Enable this to use italic text on the terminal. This is not supported on all
+# terminal emulators (like tmux, by default):
+#--italic-text=always
+
+# Uncomment the following line to disable automatic paging:
+--paging=never
+
+# Uncomment the following line if you are using less version >= 551 and want to
+# enable mouse scrolling support in `bat` when running inside tmux. This might
+# disable text selection, unless you press shift.
+#--pager="less --RAW-CONTROL-CHARS --quit-if-one-screen --mouse"
+
+# Syntax mappings: map a certain filename pattern to a language.
+#   Example 1: use the C++ syntax for Arduino .ino files
+#   Example 2: Use ".gitignore"-style highlighting for ".ignore" files
+#--map-syntax "*.ino:C++"
+#--map-syntax ".ignore:Git Ignore"
+
+--theme=Coldark-Cold
+--plain
index 0ceaeed22523342c0e8850cd7bc21160d0ca197d..310d7bf3f17eaaa5b3dd121c8bca7217adb1b70f 100644 (file)
@@ -23,10 +23,10 @@ ShowMenuBarByDefault=false
 2 screens: Width=1916
 2 screens: XPosition=2
 2 screens: YPosition=2
-3840x2160 screen: Height=2142
-3840x2160 screen: Width=1916
+3840x2160 screen: Height=2156
+3840x2160 screen: Width=3836
 3840x2160 screen: XPosition=2
-3840x2160 screen: YPosition=16
+3840x2160 screen: YPosition=2
 DP-0=DP-0
 DP-1 eDP-1=DP-1
 DP-1-1 eDP-1=DP-1-1
@@ -34,8 +34,7 @@ DP-1-3 eDP-1=eDP-1
 HDMI-1 eDP-1=eDP-1
 HDMI-2 eDP-1=HDMI-2
 MenuBar=Disabled
-State=AAAA/wAAAAD9AAAAAQAAAAAAAAAAAAAAAPwCAAAAAvsAAAAiAFEAdQBpAGMAawBDAG8AbQBtAGEAbgBkAHMARABvAGMAawAAAAAA/////wAAATUA////+wAAABwAUwBTAEgATQBhAG4AYQBnAGUAcgBEAG8AYwBrAAAAAAD/////AAAA5QD///8AAAd8AAAIbAAAAAQAAAAEAAAACAAAAAj8AAAAAQAAAAIAAAACAAAAFgBtAGEAaQBuAFQAbwBvAGwAQgBhAHIAAAAAAP////8AAAAAAAAAAAAAABwAcwBlAHMAcwBpAG8AbgBUAG8AbwBsAGIAYQByAAAAAAD/////AAAAAAAAAAA=
-ToolBarsMovable=Disabled
+State=AAAA/wAAAAD9AAAAAQAAAAAAAAAAAAAAAPwCAAAAAvsAAAAiAFEAdQBpAGMAawBDAG8AbQBtAGEAbgBkAHMARABvAGMAawAAAAAA/////wAAATUA////+wAAABwAUwBTAEgATQBhAG4AYQBnAGUAcgBEAG8AYwBrAAAAAAD/////AAAA5QD///8AAA78AAAIbAAAAAQAAAAEAAAACAAAAAj8AAAAAQAAAAIAAAACAAAAFgBtAGEAaQBuAFQAbwBvAGwAQgBhAHIAAAAAAP////8AAAAAAAAAAAAAABwAcwBlAHMAcwBpAG8AbgBUAG8AbwBsAGIAYQByAAAAAAD/////AAAAAAAAAAA=
 eDP-1=eDP-1
 
 [TabBar]
index bec7c1d6027b414a1792cff5a510ca7a6e14e7b7..65bd7857a28fb3154b276cb38035f48ded95ad5e 100644 (file)
@@ -19,5 +19,10 @@ Type=forking
 # new-session is a tmux command which allows launching profanity.
 ExecStart=/usr/bin/tmux -L profanity new-session -d profanity
 
+
+# if we have to move this to a system service:
+#User=iank
+#Group=iank
+
 [Install]
 WantedBy=default.target
index 124005b90aac016825c1e72a787906a8a2554ece..9faefbf8a1eacdc5404d3fee8af52f2a5dfd4e99 100644 (file)
@@ -3,50 +3,50 @@
 <gui version="35" name="session">
  <MenuBar>
   <Menu name="file">
-   <Action name="file_save_as" group="session-operations"/>
+   <Action group="session-operations" name="file_save_as"/>
    <Separator group="session-operations"/>
-   <Action name="file_print" group="session-operations"/>
+   <Action group="session-operations" name="file_print"/>
    <Separator group="session-operations"/>
-   <Action name="open-browser" group="session-operations"/>
-   <Action name="close-session" group="session-tab-operations"/>
+   <Action group="session-operations" name="open-browser"/>
+   <Action group="session-tab-operations" name="close-session"/>
   </Menu>
   <Menu name="edit">
-   <Action name="edit_copy" group="session-edit-operations"/>
-   <Action name="edit_paste" group="session-edit-operations"/>
+   <Action group="session-edit-operations" name="edit_copy"/>
+   <Action group="session-edit-operations" name="edit_paste"/>
    <Separator group="session-edit-operations"/>
-   <Action name="select-all" group="session-edit-operations"/>
-   <Action name="select-mode" group="session-edit-operations"/>
+   <Action group="session-edit-operations" name="select-all"/>
+   <Action group="session-edit-operations" name="select-mode"/>
    <Separator group="session-edit-operations"/>
-   <Action name="copy-input-to" group="session-edit-operations"/>
-   <Action name="send-signal" group="session-edit-operations"/>
-   <Action name="rename-session" group="session-edit-operations"/>
-   <Action name="zmodem-upload" group="session-edit-operations"/>
+   <Action group="session-edit-operations" name="copy-input-to"/>
+   <Action group="session-edit-operations" name="send-signal"/>
+   <Action group="session-edit-operations" name="rename-session"/>
+   <Action group="session-edit-operations" name="zmodem-upload"/>
    <Separator group="session-edit-operations"/>
-   <Action name="edit_find" group="session-edit-operations"/>
-   <Action name="edit_find_next" group="session-edit-operations"/>
-   <Action name="edit_find_prev" group="session-edit-operations"/>
+   <Action group="session-edit-operations" name="edit_find"/>
+   <Action group="session-edit-operations" name="edit_find_next"/>
+   <Action group="session-edit-operations" name="edit_find_prev"/>
   </Menu>
   <Menu name="view">
-   <Action name="monitor-once" group="session-view-operations"/>
-   <Action name="monitor-prompt" group="session-view-operations"/>
-   <Action name="monitor-silence" group="session-view-operations"/>
-   <Action name="monitor-activity" group="session-view-operations"/>
-   <Action name="monitor-process-finish" group="session-view-operations"/>
+   <Action group="session-view-operations" name="monitor-once"/>
+   <Action group="session-view-operations" name="monitor-prompt"/>
+   <Action group="session-view-operations" name="monitor-silence"/>
+   <Action group="session-view-operations" name="monitor-activity"/>
+   <Action group="session-view-operations" name="monitor-process-finish"/>
    <Separator group="session-view-operations"/>
-   <Action name="view-readonly" group="session-view-operations"/>
-   <Action name="allow-mouse-tracking" group="session-view-operations"/>
+   <Action group="session-view-operations" name="view-readonly"/>
+   <Action group="session-view-operations" name="allow-mouse-tracking"/>
    <Separator group="session-view-operations"/>
-   <Action name="enlarge-font" group="session-view-operations"/>
-   <Action name="reset-font-size" group="session-view-operations"/>
-   <Action name="shrink-font" group="session-view-operations"/>
-   <Action name="set-encoding" group="session-view-operations"/>
+   <Action group="session-view-operations" name="enlarge-font"/>
+   <Action group="session-view-operations" name="reset-font-size"/>
+   <Action group="session-view-operations" name="shrink-font"/>
+   <Action group="session-view-operations" name="set-encoding"/>
    <Separator group="session-view-operations"/>
-   <Action name="clear-history" group="session-view-operations"/>
-   <Action name="clear-history-and-reset" group="session-view-operations"/>
+   <Action group="session-view-operations" name="clear-history"/>
+   <Action group="session-view-operations" name="clear-history-and-reset"/>
   </Menu>
   <Menu name="settings">
-   <Action name="edit-current-profile" group="session-settings"/>
-   <Action name="switch-profile" group="session-settings"/>
+   <Action group="session-settings" name="edit-current-profile"/>
+   <Action group="session-settings" name="switch-profile"/>
   </Menu>
  </MenuBar>
  <ToolBar name="sessionToolbar">
   <Action name="edit-current-profile"/>
  </Menu>
  <ActionProperties>
-  <Action shortcut="Ctrl+Shift+R" name="edit_find_next"/>
-  <Action shortcut="Ctrl+Shift+E" name="edit_find_prev"/>
-  <Action shortcut="Ctrl++; " name="enlarge-font"/>
-  <Action shortcut="Ctrl+@" name="open-browser"/>
-  <Action shortcut="" name="rename-session"/>
-  <Action shortcut="" name="zmodem-upload"/>
+  <Action name="edit_find_next" shortcut="Ctrl+Shift+R"/>
+  <Action name="edit_find_prev" shortcut="Ctrl+Shift+E"/>
+  <Action name="enlarge-font" shortcut="Ctrl++; "/>
+  <Action name="open-browser" shortcut="Ctrl+@"/>
+  <Action name="rename-session" shortcut=""/>
+  <Action name="zmodem-upload" shortcut=""/>
  </ActionProperties>
 </gui>
index 9402e13f334ba92fb597954e0d77a96b9895a3b6..93a922e9e5e3c28cac99b4f89d6e3020535af0ad 100755 (executable)
@@ -29,8 +29,11 @@ set -e; . /usr/local/lib/bash-bear; set +e
 # first field as an integer.
 up_secs=$(sed 's/[^0-9].*//' /proc/uptime)
 
-delay=$(( 120 - up_secs ))
+delay=$(( 180 - up_secs ))
+
 
 if (( delay > 0 )); then
   sleep $delay
 fi
+
+sleep 5