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 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'justfile') 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: /' # ═══════════════════════════════════════════════════════════════════ -- cgit v1.2.3-70-g09d2