aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorLibravatar sommerfeld <sommerfeld@sommerfeld.dev>2026-04-21 01:23:39 +0100
committerLibravatar sommerfeld <sommerfeld@sommerfeld.dev>2026-04-21 01:23:39 +0100
commit8db32848b966a571a19dd1d79192a9ffbf45eeec (patch)
treeed05b7aed0070e290c01cbc63d2791d8095e4ea3
parent3a6f276f43c15b3fed1bcd1632eeb1584b37df29 (diff)
downloaddotfiles-8db32848b966a571a19dd1d79192a9ffbf45eeec.tar.gz
dotfiles-8db32848b966a571a19dd1d79192a9ffbf45eeec.tar.bz2
dotfiles-8db32848b966a571a19dd1d79192a9ffbf45eeec.zip
feat(services): add .ignore list for distro-default noise
systemd-units/.ignore is a user-maintainable list of units to suppress from 'just services-drift' uncurated output. Starts with three systemd presets that are harmless noise: remote-fs.target, systemd-network-generator.service, systemd-userdbd.socket. The dotfile is outside the *.txt glob so services / services-enable don't accidentally pick it up.
-rw-r--r--justfile7
-rw-r--r--systemd-units/.ignore7
2 files changed, 13 insertions, 1 deletions
diff --git a/justfile b/justfile
index ede837f..26058db 100644
--- a/justfile
+++ b/justfile
@@ -167,10 +167,15 @@ services-drift:
tmp=$(mktemp -d); trap 'rm -rf "$tmp"' EXIT
cat systemd-units/*.txt 2>/dev/null \
| grep -v '^\s*#' | grep -v '^\s*$' | sort -u > "$tmp/curated"
+ if [ -f systemd-units/.ignore ]; then
+ grep -v '^\s*#' systemd-units/.ignore | grep -v '^\s*$' | sort -u > "$tmp/ignore"
+ else
+ : > "$tmp/ignore"
+ fi
systemctl list-unit-files --state=enabled --no-legend 2>/dev/null \
| awk '{print $1}' | grep -vE '@\.' | sort -u > "$tmp/enabled"
comm -23 "$tmp/curated" "$tmp/enabled" | sed 's/^/ not-enabled: /'
- comm -13 "$tmp/curated" "$tmp/enabled" | sed 's/^/ uncurated: /'
+ comm -13 "$tmp/curated" "$tmp/enabled" | comm -23 - "$tmp/ignore" | sed 's/^/ uncurated: /'
# ═══════════════════════════════════════════════════════════════════
diff --git a/systemd-units/.ignore b/systemd-units/.ignore
new file mode 100644
index 0000000..2e2f56a
--- /dev/null
+++ b/systemd-units/.ignore
@@ -0,0 +1,7 @@
+# Systemd units to suppress from 'just services-drift' uncurated output.
+# Typically distro defaults enabled by systemd presets that are neither
+# worth curating nor worth disabling. One unit per line, # comments OK.
+
+remote-fs.target
+systemd-network-generator.service
+systemd-userdbd.socket