Migration This is my new public git source viewer. Source coming soon. Please contact with concerns/bugs. Contact me

users/ryan/darwin.nix

b7d807c39733ce101c55286d6428c19fb31c1ef3 · 1.5 KB · 52 lines raw

1 { config, pkgs, lib, ... }:
2
3 {
4 imports = [
5 ./modules/sketchybar
6 ./modules/simple-bar
7 ./modules/taskwarrior-ubersicht
8 ./modules/ubersicht
9 ];
10
11 ryan.sketchybar.enable = true;
12
13 # Need special config for gpg-agent on macOS
14 home.file.".gnupg/gpg-agent.conf".text = ''
15 pinentry-program ${pkgs.pinentry_mac}/Applications/pinentry-mac.app/Contents/MacOS/pinentry-mac
16 enable-ssh-support
17 '';
18
19 # Add hammerspoon
20 home.file.".hammerspoon".source = ./hammerspoon;
21
22 home.file.".config/homebrew".source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/.homebrew";
23
24 home.packages = with pkgs; [
25 iina # Media player (frontend to mpv essentially)
26 jujutsu
27 netbird-tui
28 ];
29
30 # Install User apps to subdir for dock stuff
31 targets.darwin.linkApps.directory = "Applications/User Apps";
32
33 # Symlink System apps into the user apps "system" dir
34 home.activation.linkSystemApps = lib.hm.dag.entryAfter ["writeBoundary"] ''
35 if [[ -z "$HOME" ]]; then
36 echo "ERROR: HOME was not defined. This should not happen. Bailing! ">&2
37 exit 1
38 fi
39
40 $DRY_RUN_CMD mkdir -p "$HOME/Applications/System Apps"
41
42 $DRY_RUN_CMD rm -rf "$HOME/Applications/System Apps/"*.app
43
44 $DRY_RUN_CMD find /Applications /System/Applications -maxdepth 2 -name "*.app" \
45 -prune -exec ln -sf {} "$HOME/Applications/System Apps/" \;
46 '';
47
48 # Restart gpg-agent
49 home.activation.restartGpgAgent = lib.hm.dag.entryAfter ["writeBoundary"] ''
50 $DRY_RUN_CMD ${pkgs.gnupg}/bin/gpgconf --kill gpg-agent || true
51 '';
52 }