]> git.rmz.io Git - dotfiles.git/commitdiff
systemd: symlink system units into /etc
authorSamir Benmendil <me@rmz.io>
Sun, 30 Oct 2022 20:30:10 +0000 (20:30 +0000)
committerSamir Benmendil <me@rmz.io>
Fri, 13 Jan 2023 00:23:17 +0000 (00:23 +0000)
Makefile

index 253b040a74969da510495b27d4c8df8e71aeba1e..a8f26ed7036f15538408e22a4eb1bb8212d77245 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -118,7 +118,11 @@ ssh:
        ln -sfT $(APATH)/ssh/config ~/.ssh/config
 .PHONY: ssh
 
-systemd: $(XDG_CONFIG_HOME)
+/etc/systemd/system/%: systemd/system/%
+       sudo ln -s $(APATH)/$< $@
+
+systemd_system_units := $(patsubst %,/etc/%,$(wildcard systemd/system/*))
+systemd: $(XDG_CONFIG_HOME) $(systemd_system_units)
        ln -sfT $(APATH)/$@ $(XDG_CONFIG_HOME)/$@
 .PHONY: systemd