users/ryan/darwin.nix

1e8ce6189d196b8d75f9c15bec198ef4fa7a339b · 2.0 KB · 70 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 # common.nix's programs.git.settings now sets filter.lfs (merged from
43 # guix-dotfiles' .gitconfig) - Guix's package list already has git-lfs,
44 # darwin needs its own copy or LFS checkouts hard-fail.
45 git-lfs
46 ];
47
48 # Install User apps to subdir for dock stuff
49 targets.darwin.linkApps.directory = "Applications/User Apps";
50
51 # Symlink System apps into the user apps "system" dir
52 home.activation.linkSystemApps = lib.hm.dag.entryAfter ["writeBoundary"] ''
53 if [[ -z "$HOME" ]]; then
54 echo "ERROR: HOME was not defined. This should not happen. Bailing! ">&2
55 exit 1
56 fi
57
58 $DRY_RUN_CMD mkdir -p "$HOME/Applications/System Apps"
59
60 $DRY_RUN_CMD rm -rf "$HOME/Applications/System Apps/"*.app
61
62 $DRY_RUN_CMD find /Applications /System/Applications -maxdepth 2 -name "*.app" \
63 -prune -exec ln -sf {} "$HOME/Applications/System Apps/" \;
64 '';
65
66 # Restart gpg-agent
67 home.activation.restartGpgAgent = lib.hm.dag.entryAfter ["writeBoundary"] ''
68 $DRY_RUN_CMD ${pkgs.gnupg}/bin/gpgconf --kill gpg-agent || true
69 '';
70 }