users/ryan/darwin.nix

7108fc28e06a6326f7a04251cc95bbe50ced6133 · 1.8 KB · 66 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 home.stateVersion = "26.05"; # Please read the comment before changing.
12
13 ryan.sketchybar.enable = true;
14
15 programs.zen-browser = {
16 package = null; # managed via homebrew
17 darwinDefaultsId = "app.zen-browser.zen";
18 };
19
20 # Need special config for gpg-agent on macOS
21 home.file.".gnupg/gpg-agent.conf".text = ''
22 pinentry-program ${pkgs.pinentry_mac}/Applications/pinentry-mac.app/Contents/MacOS/pinentry-mac
23 enable-ssh-support
24 '';
25
26 # Add hammerspoon
27 home.file.".hammerspoon".source = ./hammerspoon;
28
29 home.file.".config/homebrew".source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/.homebrew";
30
31 home.packages = with pkgs; [
32 bat
33 pass
34 pandoc
35 iina # Media player (frontend to mpv essentially)
36 audacity
37 ffmpeg
38 blender
39 nerd-fonts.anonymice
40 jujutsu
41 netbird-tui
42 ];
43
44 # Install User apps to subdir for dock stuff
45 targets.darwin.linkApps.directory = "Applications/User Apps";
46
47 # Symlink System apps into the user apps "system" dir
48 home.activation.linkSystemApps = lib.hm.dag.entryAfter ["writeBoundary"] ''
49 if [[ -z "$HOME" ]]; then
50 echo "ERROR: HOME was not defined. This should not happen. Bailing! ">&2
51 exit 1
52 fi
53
54 $DRY_RUN_CMD mkdir -p "$HOME/Applications/System Apps"
55
56 $DRY_RUN_CMD rm -rf "$HOME/Applications/System Apps/"*.app
57
58 $DRY_RUN_CMD find /Applications /System/Applications -maxdepth 2 -name "*.app" \
59 -prune -exec ln -sf {} "$HOME/Applications/System Apps/" \;
60 '';
61
62 # Restart gpg-agent
63 home.activation.restartGpgAgent = lib.hm.dag.entryAfter ["writeBoundary"] ''
64 $DRY_RUN_CMD ${pkgs.gnupg}/bin/gpgconf --kill gpg-agent || true
65 '';
66 }