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

users/ryan/darwin.nix

ff4f79c0575699080140693d6d811485193929f5 · 1.6 KB · 53 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 extra-socket ${config.home.homeDirectory}/.gnupg/S.gpg-agent.extra
17 enable-ssh-support
18 '';
19
20 # Add hammerspoon
21 home.file.".hammerspoon".source = ./hammerspoon;
22
23 home.file.".config/homebrew".source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/.homebrew";
24
25 home.packages = with pkgs; [
26 iina # Media player (frontend to mpv essentially)
27 jujutsu
28 netbird-tui
29 ];
30
31 # Install User apps to subdir for dock stuff
32 targets.darwin.linkApps.directory = "Applications/User Apps";
33
34 # Symlink System apps into the user apps "system" dir
35 home.activation.linkSystemApps = lib.hm.dag.entryAfter ["writeBoundary"] ''
36 if [[ -z "$HOME" ]]; then
37 echo "ERROR: HOME was not defined. This should not happen. Bailing! ">&2
38 exit 1
39 fi
40
41 $DRY_RUN_CMD mkdir -p "$HOME/Applications/System Apps"
42
43 $DRY_RUN_CMD rm -rf "$HOME/Applications/System Apps/"*.app
44
45 $DRY_RUN_CMD find /Applications /System/Applications -maxdepth 2 -name "*.app" \
46 -prune -exec ln -sf {} "$HOME/Applications/System Apps/" \;
47 '';
48
49 # Restart gpg-agent
50 home.activation.restartGpgAgent = lib.hm.dag.entryAfter ["writeBoundary"] ''
51 $DRY_RUN_CMD ${pkgs.gnupg}/bin/gpgconf --kill gpg-agent || true
52 '';
53 }