From 05d3d0f576062b8ae43c1fe43062576b84d8ab01 Mon Sep 17 00:00:00 2001 From: Haak Saxberg Date: Sat, 3 Feb 2024 23:19:40 -0800 Subject: [PATCH] Fix worktop app location and add postbird --- nix/system/worktop/darwin-configuration.nix | 26 +++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/nix/system/worktop/darwin-configuration.nix b/nix/system/worktop/darwin-configuration.nix index 7fa4211..abf17e5 100644 --- a/nix/system/worktop/darwin-configuration.nix +++ b/nix/system/worktop/darwin-configuration.nix @@ -13,7 +13,6 @@ let pkgs.callPackage ./makeApp.nix rec { name = "VLC"; version = "3.0.18"; - sourceRoot = "${name}.app"; src = pkgs.fetchurl { url = "https://get.videolan.org/vlc/3.0.18/macosx/vlc-${version}-arm64.dmg"; sha256 = "0iwgcrwcfyw0r41kjx4hx1sy37mzx5q8nlbzh58gs8ajpjymkhlr"; @@ -39,6 +38,16 @@ let sha256 = "54794fbf4b29c9a56f6e8a736ff5445c75a1fd3cf49dce7b4d7aa6ff067ae2ef"; }; }; + + postbird = + pkgs.callPackage ./makeApp.nix rec { + name = "Postbird"; + version = "0.8.4"; + src = pkgs.fetchurl { + url = "https://github.com/Paxa/postbird/releases/download/${version}/Postbird-${version}.dmg"; + sha256 = "1gk7gk3c38rwagx535nl9p0r8drpxfijdiv20qdv7yj81h79db6r"; + }; + }; in { imports = [ ]; @@ -59,6 +68,7 @@ in vlc keycastr discord + postbird # wishlist # todo (unsupported on aarch64-darwin): @@ -89,11 +99,19 @@ in # by nix-darwin system.activationScripts.applications.text = pkgs.lib.mkForce ( '' - rm -rf ~/Applications/Nix\ Apps - mkdir -p ~/Applications/Nix\ Apps + userDir="/Users/haak/Applications/Nix Apps" + echo "setting up $userDir" + rm -rf $userDir + mkdir -p $userDir + chown haak $userDir for app in $(find ${config.system.build.applications}/Applications -maxdepth 1 -type l); do src="$(/usr/bin/stat -f%Y "$app")" - cp -r "$src" ~/Applications/Nix\ Apps + dst="$userDir/$(basename $src)" + echo "app: $app, src: $src, dst: $dst" + if [[ ! -e $dst ]]; then + echo "Linking $app" + ln -s "$app" "$dst" + fi done '' );