From 32be4dc72b09caa91430a18d15b35622f166898e Mon Sep 17 00:00:00 2001 From: sommerfeld Date: Wed, 13 May 2026 13:43:21 +0100 Subject: refactor(units): split systemd-units into system/ and user/ trees Move the three existing files into systemd-units/system/ and seed systemd-units/user/ with a .ignore stub. Teach the unit-* recipes a user:/system: group-token prefix (bare names keep system semantics for back-compat). unit-apply and unit-status now walk both scopes; user units go through 'systemctl --user' (no sudo), system units via 'sudo systemctl' as before. Soft-fail per unit preserved for both scopes. Top-level add/forget dispatchers need no changes: the unit-extension sniff already routes anything ending in .service/.timer/etc to unit-*, and user:base passes through as the group token. Docs updated in README.md and .github/copilot-instructions.md. --- systemd-units/system/.ignore | 14 ++++++++++++++ systemd-units/system/base.txt | 18 ++++++++++++++++++ systemd-units/system/btc.txt | 4 ++++ 3 files changed, 36 insertions(+) create mode 100644 systemd-units/system/.ignore create mode 100644 systemd-units/system/base.txt create mode 100644 systemd-units/system/btc.txt (limited to 'systemd-units/system') diff --git a/systemd-units/system/.ignore b/systemd-units/system/.ignore new file mode 100644 index 0000000..32f2225 --- /dev/null +++ b/systemd-units/system/.ignore @@ -0,0 +1,14 @@ +# 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-networkd.socket +systemd-networkd-resolve-hook.socket +systemd-networkd-varlink.socket +systemd-networkd-varlink-metrics.socket +systemd-oomd.socket +systemd-resolved-monitor.socket +systemd-resolved-varlink.socket +systemd-userdbd.socket diff --git a/systemd-units/system/base.txt b/systemd-units/system/base.txt new file mode 100644 index 0000000..6f8582a --- /dev/null +++ b/systemd-units/system/base.txt @@ -0,0 +1,18 @@ +# Systemd units to enable when the 'base' meta group is installed. +# One unit per line, # comments OK. + +systemd-timesyncd.service +systemd-resolved.service +systemd-oomd.service +reflector.timer +paccache.timer +acpid.service +cpupower.service +iwd.service +systemd-networkd.service +systemd-networkd-wait-online.service +tlp.service +pcscd.socket +smartd.service +btrfs-scrub@-.timer +fwupd-refresh.timer diff --git a/systemd-units/system/btc.txt b/systemd-units/system/btc.txt new file mode 100644 index 0000000..b30199c --- /dev/null +++ b/systemd-units/system/btc.txt @@ -0,0 +1,4 @@ +# Systemd units to enable when the 'btc' meta group is installed. +# One unit per line, # comments OK. + +tor.service -- cgit v1.3.1