users/ryan/darwin.nix
0ce4331f742863ec03c711c27b0a0dee7e8cc187
· 1.7 KB · 60 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 | iina # Media player (frontend to mpv essentially) |
| 33 | nerd-fonts.anonymice |
| 34 | jujutsu |
| 35 | netbird-tui |
| 36 | ]; |
| 37 | |
| 38 | # Install User apps to subdir for dock stuff |
| 39 | targets.darwin.linkApps.directory = "Applications/User Apps"; |
| 40 | |
| 41 | # Symlink System apps into the user apps "system" dir |
| 42 | home.activation.linkSystemApps = lib.hm.dag.entryAfter ["writeBoundary"] '' |
| 43 | if [[ -z "$HOME" ]]; then |
| 44 | echo "ERROR: HOME was not defined. This should not happen. Bailing! ">&2 |
| 45 | exit 1 |
| 46 | fi |
| 47 | |
| 48 | $DRY_RUN_CMD mkdir -p "$HOME/Applications/System Apps" |
| 49 | |
| 50 | $DRY_RUN_CMD rm -rf "$HOME/Applications/System Apps/"*.app |
| 51 | |
| 52 | $DRY_RUN_CMD find /Applications /System/Applications -maxdepth 2 -name "*.app" \ |
| 53 | -prune -exec ln -sf {} "$HOME/Applications/System Apps/" \; |
| 54 | ''; |
| 55 | |
| 56 | # Restart gpg-agent |
| 57 | home.activation.restartGpgAgent = lib.hm.dag.entryAfter ["writeBoundary"] '' |
| 58 | $DRY_RUN_CMD ${pkgs.gnupg}/bin/gpgconf --kill gpg-agent || true |
| 59 | ''; |
| 60 | } |