-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsecretive.nix
33 lines (29 loc) · 1.02 KB
/
secretive.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{ pkgs, lib, ... }:
let
secretive = pkgs.stdenv.mkDerivation {
name = "secretive";
version = "2.2.0";
src = pkgs.fetchzip {
url = "https://github.com/maxgoedjen/secretive/releases/download/v2.2.0/Secretive.zip";
hash = "sha256-/sJvzPfj2sR87EXCQcPDeF/LMOe3bzqATTKDKG80jnE=";
};
phases = [ "unpackPhase" "installPhase" ];
installPhase = ''
mkdir -p $out/Applications
cp -r $src $out/Applications/Secretive.app
'';
};
in
{
home = {
activation = {
alias-secretive = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
$DRY_RUN_CMD rm -f $HOME/Applications/Secretive.app
$DRY_RUN_CMD osascript -e "tell app \"Finder\"" -e "make new alias file at POSIX file \"$HOME/Applications\" to POSIX file \"${secretive}/Applications/Secretive.app\"" -e "set name of result to \"Secretive.app\"" -e "end tell"
'';
};
};
programs.zsh.sessionVariables = {
SSH_AUTH_SOCK = "$HOME/Library/Containers/com.maxgoedjen.Secretive.SecretAgent/Data/socket.ssh";
};
}