From 8db32848b966a571a19dd1d79192a9ffbf45eeec Mon Sep 17 00:00:00 2001 From: sommerfeld Date: Tue, 21 Apr 2026 01:23:39 +0100 Subject: 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. --- justfile | 7 ++++++- systemd-units/.ignore | 7 +++++++ 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 systemd-units/.ignore 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 -- cgit v1.2.3-70-g09d2