ctucx.git: nixfiles

ctucx' nixfiles

commit 791a702195431a94e65c335a9e40bceadba834f9
parent a39a11f9d2c569196ffc02dd78e5fd0fc2712b1e
Author: Leah (ctucx) <git@ctu.cx>
Date: Tue, 6 Dec 2022 17:01:23 +0100

configurations/darwin: use dockutil to declaratively configure dock!
2 files changed, 21 insertions(+), 0 deletions(-)
diff --git a/configurations/darwin/default.nix b/configurations/darwin/default.nix
@@ -13,6 +13,7 @@
     ./yabai.nix
     ./speakers.nix
     ./syncthing.nix
+    ./dock.nix
 
     ../common/programs/gpg.nix
     ../common/programs/password-store.nix
diff --git a/configurations/darwin/dock.nix b/configurations/darwin/dock.nix
@@ -0,0 +1,19 @@
+{ pkgs, ... }:
+
+{
+  system.activationScripts.postActivation.text = ''
+    ${pkgs.dockutil}/bin/dockutil \
+      --remove all \
+      --add /Applications/Firefox.app \
+      --add /Applications/Thunderbird.app \
+      --add /Applications/Telegram.app \
+      --add /Applications/Navigator.app \
+      --add /System/Applications/Calendar.app \
+      --add /System/Applications/Reminders.app \
+      --add /System/Applications/Photos.app \
+      --add /System/Applications/Podcasts.app \
+      --add /Applications/iTerm.app \
+      --add "/System/Applications/Utilities/Activity Monitor.app" \
+      --add "/System/Applications/System Settings.app"
+  '';
+}+
\ No newline at end of file