aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralex <alex@pdp7.net>2023-05-07 09:48:18 +0000
committeralex <alex@pdp7.net>2023-05-07 09:48:18 +0000
commitbe2e5d5ed2f7a8c77b6ce5d871f21c5640ee5748 (patch)
treee91f14e6e2fc287a999fcb8d8b64211e45a9a03f
parentab9427cab19165ee67faa40f5010c6267f811f5a (diff)
Deploy dotfiles
-rwxr-xr-xworkstation/setup.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/workstation/setup.py b/workstation/setup.py
index f1fbea96..b2684ae1 100755
--- a/workstation/setup.py
+++ b/workstation/setup.py
@@ -42,3 +42,13 @@ subprocess.run(["systemctl", "--user", "enable", "--now", "nextcloud"], check=Tr
if not (pathlib.Path.home() / ".ssh").exists():
subprocess.run(["ln", "-s", "Nextcloud/_ssh", ".ssh"], check=True)
+
+
+dotfiles_dir = pathlib.Path.home() / "Nextcloud" / "dotfiles"
+
+for dotfile in dotfiles_dir.glob("*"):
+ relative_dotfile = dotfile.relative_to(dotfiles_dir)
+ replaced_dotfile = pathlib.Path.home() / ("." + relative_dotfile.parts[0][1:])
+ if not replaced_dotfile.exists():
+ subprocess.run(["ln", "-s", dotfile, replaced_dotfile], check=True)
+