users/ryan/darwin.nix
0c8fa3a2a270747f3dbb54fe8792f3f0aec997e3
· 1.9 KB · 68 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.packages = with pkgs; [ |
| 30 | bat |
| 31 | pass |
| 32 | pandoc |
| 33 | iina # Media player (frontend to mpv essentially) |
| 34 | audacity |
| 35 | ffmpeg |
| 36 | blender |
| 37 | nerd-fonts.anonymice |
| 38 | jujutsu |
| 39 | netbird-tui |
| 40 | # common.nix's programs.git.settings now sets filter.lfs (merged from |
| 41 | # guix-dotfiles' .gitconfig) - Guix's package list already has git-lfs, |
| 42 | # darwin needs its own copy or LFS checkouts hard-fail. |
| 43 | git-lfs |
| 44 | ]; |
| 45 | |
| 46 | # Install User apps to subdir for dock stuff |
| 47 | targets.darwin.linkApps.directory = "Applications/User Apps"; |
| 48 | |
| 49 | # Symlink System apps into the user apps "system" dir |
| 50 | home.activation.linkSystemApps = lib.hm.dag.entryAfter ["writeBoundary"] '' |
| 51 | if [[ -z "$HOME" ]]; then |
| 52 | echo "ERROR: HOME was not defined. This should not happen. Bailing! ">&2 |
| 53 | exit 1 |
| 54 | fi |
| 55 | |
| 56 | $DRY_RUN_CMD mkdir -p "$HOME/Applications/System Apps" |
| 57 | |
| 58 | $DRY_RUN_CMD rm -rf "$HOME/Applications/System Apps/"*.app |
| 59 | |
| 60 | $DRY_RUN_CMD find /Applications /System/Applications -maxdepth 2 -name "*.app" \ |
| 61 | -prune -exec ln -sf {} "$HOME/Applications/System Apps/" \; |
| 62 | ''; |
| 63 | |
| 64 | # Restart gpg-agent |
| 65 | home.activation.restartGpgAgent = lib.hm.dag.entryAfter ["writeBoundary"] '' |
| 66 | $DRY_RUN_CMD ${pkgs.gnupg}/bin/gpgconf --kill gpg-agent || true |
| 67 | ''; |
| 68 | } |