this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Miscellaneous settings updates

- Fix SSL issues for nix binaries like curl/git/etc
- Refactor flake `lib` output into a separate file
- Fix stylua config in pre-commit
- more iTerm settings as a script instead of plist
- Spotlight preferences

+272 -77
+4 -2
.config/flake.code-workspace
··· 1 1 { 2 2 "folders": [ 3 - // Without https://github.com/microsoft/vscode/issues/869 this is really annoying: 3 + // Without one of these it's annoying to include the flake.nix file 4 + // - https://github.com/microsoft/vscode/issues/869 5 + // - https://github.com/microsoft/vscode/issues/45177 4 6 // { 5 7 // "path": "." 6 8 // }, ··· 20 22 "path": "nixpkgs" 21 23 }, 22 24 ], 23 - "settings": {} 25 + "settings": {}, 24 26 }
+1 -49
.config/flake.nix
··· 91 91 }; 92 92 in 93 93 { 94 - # Helper functions that aren't in upstream nixpkgs.lib. It would be nice 95 - # for this to be usable as a module that extends nixpkgs.lib for the 96 - # appropriate `pkgs`, but for now `self.lib` is good enough 97 - lib = { 98 - /** Return the given value if non-null, otherwise the given `default` */ 99 - unwrapOr = default: v: 100 - if v == null then default else v; 101 - 102 - /** Filter a list of paths to include only those that actually exist */ 103 - existingPaths = builtins.filter builtins.pathExists; 104 - 105 - /** Enable "escape sequences" in a string by (ab)using the builtin Nix JSON parser. 106 - For readability / sanity, this should probably only ever be used with a 107 - single-quoted '' literals for backslashes to work as expected. 108 - <https://github.com/NixOS/nix/issues/10082> 109 - */ 110 - unescape = s: 111 - let escaped = builtins.replaceStrings [ "\"" ] [ "\\\"" ] s; 112 - in builtins.fromJSON ''"${escaped}"''; 113 - 114 - /** com.apple.dock helpers */ 115 - dock = with self.lib.dock; { 116 - path-entry = path: { 117 - tile-data = { 118 - file-data = { 119 - _CFURLString = "${path}"; 120 - _CFURLStringType = 0; 121 - }; 122 - }; 123 - }; 124 - 125 - folder = path: lib.recursiveUpdate (path-entry path) { 126 - tile-data = { 127 - # Show as folder icon instead of stack etc. 128 - displayas = 1; 129 - # Use default appearance for contents, set 2 to force grid here 130 - showas = 0; 131 - }; 132 - tile-type = "directory-tile"; 133 - }; 134 - 135 - app-in-dir = dir: appName: path-entry "${dir}/${appName}.app"; 136 - system-app = app-in-dir "/System/Applications"; 137 - small-spacer = { 138 - tile-data = { }; 139 - tile-type = "small-spacer-tile"; 140 - }; 141 - }; 142 - }; 94 + lib = import ./nix/lib.nix (inputs // { inherit lib; }); 143 95 144 96 darwinConfigurations = mapAttrs 145 97 (hostname: { system, user, ... }: nix-darwin.lib.darwinSystem {
+3 -8
.config/home-manager/home.nix
··· 173 173 colima 174 174 ]; 175 175 176 - # TODO: https://github.com/nix-community/home-manager/issues/5602 177 - home.sessionVariables = { 178 - # https://github.com/NixOS/nixpkgs/issues/66716 179 - # https://github.com/NixOS/nixpkgs/issues/210223 180 - SSL_CERT_FILE = "${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt"; 181 - SYSTEM_CERTIFICATE_PATH = "${config.home.sessionVariables.SSL_CERT_FILE}"; 182 - GIT_SSL_CAINFO = "${config.home.sessionVariables.SSL_CERT_FILE}"; 183 - }; 176 + home.sessionVariables = lib.mkIf 177 + (!stdenv.isDarwin) 178 + (self.lib.sslCertEnv "${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt"); 184 179 185 180 home.stateVersion = "20.09"; 186 181 }
+49
.config/home-manager/macos-defaults.nix
··· 150 150 ]; 151 151 }; 152 152 153 + "com.apple.Spotlight" = 154 + let 155 + # This order is the one provided by macOS, but maybe customizable? 156 + categories = [ 157 + "APPLICATIONS" 158 + "MENU_EXPRESSION" # Calculator 159 + "CONTACT" 160 + "MENU_CONVERSION" 161 + "MENU_DEFINITION" 162 + "DOCUMENTS" 163 + "EVENT_TODO" 164 + "DIRECTORIES" 165 + "FONTS" 166 + "IMAGES" 167 + "MESSAGES" 168 + "MOVIES" 169 + "MUSIC" 170 + "MENU_OTHER" 171 + "PDF" 172 + "PRESENTATIONS" 173 + { 174 + # Siri Suggestions 175 + name = "MENU_SPOTLIGHT_SUGGESTIONS"; 176 + enabled = false; 177 + } 178 + "SPREADSHEETS" 179 + "SYSTEM_PREFS" 180 + { 181 + name = "TIPS"; 182 + enabled = false; 183 + } 184 + { 185 + # Websites 186 + name = "BOOKMARKS"; 187 + enabled = false; 188 + } 189 + ]; 190 + in 191 + { 192 + orderedItems = map 193 + (category: 194 + if builtins.isString category then 195 + { enabled = true; name = category; } 196 + else 197 + category 198 + ) 199 + categories; 200 + }; 201 + 153 202 #endregion 154 203 155 204 #region per-app defaults
+105
.config/iterm2/profiles/Default.json
··· 573 573 "0xf739-0x0": { 574 574 "Action": 13, 575 575 "Text": "" 576 + }, 577 + "0x19-0x60000": { 578 + "Action": 2, 579 + "Apply Mode": 0, 580 + "Escaping": 1, 581 + "Text": "", 582 + "Version": 2 583 + }, 584 + "0x5c-0x100000-0x2a": { 585 + "Action": 29, 586 + "Apply Mode": 0, 587 + "Escaping": 2, 588 + "Text": "21922352-0CDF-42DB-B31E-C78ABCAAEA80", 589 + "Version": 2 590 + }, 591 + "0x70-0x100000": { 592 + "Action": 13, 593 + "Apply Mode": 0, 594 + "Escaping": 1, 595 + "Text": "", 596 + "Version": 2 597 + }, 598 + "0x7a-0x100000": { 599 + "Action": 44, 600 + "Apply Mode": 0, 601 + "Escaping": 1, 602 + "Text": "", 603 + "Version": 2 604 + }, 605 + "0x7c-0x120000-0x2a": { 606 + "Action": 28, 607 + "Apply Mode": 0, 608 + "Escaping": 2, 609 + "Text": "21922352-0CDF-42DB-B31E-C78ABCAAEA80", 610 + "Version": 2 611 + }, 612 + "0x9-0x40000": { 613 + "Action": 0, 614 + "Apply Mode": 0, 615 + "Escaping": 1, 616 + "Text": "", 617 + "Version": 2 618 + }, 619 + "0xd-0x100000": { 620 + "Action": 13, 621 + "Apply Mode": 0, 622 + "Escaping": 1, 623 + "Text": "", 624 + "Version": 2 625 + }, 626 + "0xf700-0x300000": { 627 + "Action": 7, 628 + "Apply Mode": 0, 629 + "Escaping": 1, 630 + "Text": "", 631 + "Version": 2 632 + }, 633 + "0xf701-0x300000": { 634 + "Action": 6, 635 + "Apply Mode": 0, 636 + "Escaping": 1, 637 + "Text": "", 638 + "Version": 2 639 + }, 640 + "0xf729-0x0": { 641 + "Action": 5, 642 + "Apply Mode": 0, 643 + "Escaping": 1, 644 + "Text": "", 645 + "Version": 2 646 + }, 647 + "0xf729-0x20000": { 648 + "Action": 5, 649 + "Apply Mode": 0, 650 + "Escaping": 1, 651 + "Text": "", 652 + "Version": 2 653 + }, 654 + "0xf72b-0x0": { 655 + "Action": 4, 656 + "Apply Mode": 0, 657 + "Escaping": 1, 658 + "Text": "", 659 + "Version": 2 660 + }, 661 + "0xf72b-0x20000": { 662 + "Action": 4, 663 + "Apply Mode": 0, 664 + "Escaping": 1, 665 + "Text": "", 666 + "Version": 2 667 + }, 668 + "0xf72c-0x20000": { 669 + "Action": 9, 670 + "Apply Mode": 0, 671 + "Escaping": 1, 672 + "Text": "", 673 + "Version": 2 674 + }, 675 + "0xf72d-0x20000": { 676 + "Action": 8, 677 + "Apply Mode": 0, 678 + "Escaping": 1, 679 + "Text": "", 680 + "Version": 2 576 681 } 577 682 }, 578 683 "Link Color": {
+1 -2
.config/iterm2/profiles/SSH Session (xterm-256color).json
··· 3 3 { 4 4 "Bound Hosts": [], 5 5 "Close Sessions On End": false, 6 - "Command": "/usr/local/bin/fish -liC 'ssh $$USER$$@$$HOST$$'", 7 - "Custom Command": "Yes", 6 + "Custom Command": "No", 8 7 "Dynamic Profile Filename": "/Users/ichamberlain/.config/iterm2/profiles/SSH Session (xterm-256color).json", 9 8 "Guid": "2E1FFBC4-0DA6-4AC7-BA2A-340E6787C9B9", 10 9 "Has Hotkey": false,
+14
.config/iterm2/profiles/SolutionTest.json
··· 8 8 "Green Component": 0.5, 9 9 "Red Component": 0 10 10 }, 11 + "Badge Color (Dark)": { 12 + "Alpha Component": 0.85, 13 + "Blue Component": 1, 14 + "Color Space": "sRGB", 15 + "Green Component": 0.5, 16 + "Red Component": 0 17 + }, 18 + "Badge Color (Light)": { 19 + "Alpha Component": 0.85, 20 + "Blue Component": 1, 21 + "Color Space": "sRGB", 22 + "Green Component": 0.5, 23 + "Red Component": 0 24 + }, 11 25 "Badge Text": "TEST", 12 26 "Bound Hosts": [ 13 27 "!pharmacy-jumper",
+14 -3
.config/iterm2/scripts/AutoLaunch/config.py
··· 17 17 P.HIDE_TAB_NUMBER: True, 18 18 P.OPEN_TMUX_WINDOWS_IN: 2, # tabs in existing window 19 19 P.PASTE_TAB_TO_STRING_TAB_STOP_SIZE: 4, 20 + P.PROMPT_ON_QUIT: False, 20 21 P.SPLIT_PANE_DIMMING_AMOUNT: 0.15, 21 - P.STATUS_BAR_POSITION: 1, # bottom 22 22 P.STATUS_BAR_POSITION: 1, # bottom 23 23 P.STRETCH_TABS_TO_FILL_BAR: False, 24 - P.THEME: 5, # Minimal "borderless" theme 24 + P.THEME: 5, # minimal "borderless" theme 25 + P.USE_TMUX_PROFILE: False, 25 26 P.WINDOW_NUMBER: False, 26 27 P.WORD_CHARACTERS: "".join(["/", "-", "+", "\\", "~", "_", "."]), 27 - # These don't have PreferenceKey enums, but the API still works to set them. 28 + # These don't have PreferenceKey enums, but the API still works to set them: 28 29 "DynamicProfilesPath": "~/.config/iterm2/profiles", 30 + "NoSyncNewTabFromTmuxOpensTmux": True, 31 + "NoSyncNewTabFromTmuxOpensTmux_selection": 1, 32 + "NoSyncNewWindowFromTmuxOpensTmux": True, 33 + "NoSyncNewWindowFromTmuxOpensTmux_selection": 1, 29 34 "NoSyncTurnOffBracketedPasteOnHostChange": True, 35 + "NoSyncTurnOffMouseReportingOnHostChange": False, 30 36 "PointerActions": { 31 37 "Button,1,1,,": {"Action": "kContextMenuPointerAction"}, 32 38 "Button,2,1,,": {"Action": "kPasteFromClipboardPointerAction"}, 33 39 }, 40 + # TODO: 41 + # - GlobalKeyMap 42 + # - maybe arrangements idk 43 + # - alternative color themes? 44 + # - ??? 34 45 } 35 46 36 47
+3 -3
.config/lnav/config.json
··· 22 22 } 23 23 } 24 24 }, 25 + "mouse": { 26 + "mode": "enabled" 27 + }, 25 28 "movement": { 26 29 "mode": "top" 27 - }, 28 - "keymap-defs": { 29 - "default": { } 30 30 } 31 31 } 32 32 }
+1 -9
.config/nix-darwin/configuration.nix
··· 8 8 /usr/bin/security export -t certs -f pemseq -k /System/Library/Keychains/SystemRootCertificates.keychain >> $out 9 9 ''; 10 10 11 - systemCABundleEnv = { 12 - # Not which are needed / relevant all the time, but I've seen a bunch 13 - # of various resources refer to one or multiple of these... 14 - NIX_SSL_CERT_FILE = "${systemCABundle}"; 15 - SSL_CERT_FILE = "${systemCABundle}"; 16 - REQUESTS_CA_BUNDLE = "${systemCABundle}"; 17 - SYSTEM_CERTIFICATE_PATH = "${systemCABundle}"; 18 - GIT_SSL_CAINFO = "${systemCABundle}"; 19 - }; 11 + systemCABundleEnv = self.lib.sslCertEnv "${systemCABundle}"; 20 12 21 13 mkIfWork = lib.mkIf (host.class == "work"); 22 14 in
+2
.config/nix-darwin/vscode.nix
··· 20 20 "bierner.markdown-mermaid" 21 21 "bmalehorn.vscode-fish" 22 22 "bpruitt-goddard.mermaid-markdown-syntax-highlighting" 23 + "caponetto.vscode-diff-viewer" 23 24 "codezombiech.gitignore" 24 25 "dan-c-underwood.arm" 25 26 "DavidAnson.vscode-markdownlint" ··· 76 77 "rust-lang.rust-analyzer" 77 78 "ryanluker.vscode-coverage-gutters" 78 79 "samuelcolvin.jinjahtml" 80 + "semanticdiff.semanticdiff" 79 81 "Shopify.ruby-lsp" 80 82 "sleistner.vscode-fileutils" 81 83 "streetsidesoftware.code-spell-checker"
+66
.config/nix/lib.nix
··· 1 + # Helper functions that aren't in upstream nixpkgs.lib. It would be nice 2 + # for this to be usable as a module that extends nixpkgs.lib for the 3 + # appropriate `pkgs`, but for now `self.lib` is good enough 4 + { self, lib, ... }: 5 + { 6 + /** Return the given value if non-null, otherwise the given `default` */ 7 + unwrapOr = default: v: 8 + if v == null then default else v; 9 + 10 + /** Filter a list of paths to include only those that actually exist */ 11 + existingPaths = builtins.filter builtins.pathExists; 12 + 13 + /** Enable "escape sequences" in a string by (ab)using the builtin Nix JSON parser. 14 + For readability / sanity, this should probably only ever be used with a 15 + single-quoted '' literals for backslashes to work as expected. 16 + <https://github.com/NixOS/nix/issues/10082> 17 + */ 18 + unescape = s: 19 + let escaped = builtins.replaceStrings [ "\"" ] [ "\\\"" ] s; 20 + in builtins.fromJSON ''"${escaped}"''; 21 + 22 + /** com.apple.dock helpers */ 23 + dock = with self.lib.dock; { 24 + path-entry = path: { 25 + tile-data = { 26 + file-data = { 27 + _CFURLString = "${path}"; 28 + _CFURLStringType = 0; 29 + }; 30 + }; 31 + }; 32 + 33 + folder = path: lib.recursiveUpdate (path-entry path) { 34 + tile-data = { 35 + # Show as folder icon instead of stack etc. 36 + displayas = 1; 37 + # Use default appearance for contents, set 2 to force grid here 38 + showas = 0; 39 + }; 40 + tile-type = "directory-tile"; 41 + }; 42 + 43 + app-in-dir = dir: appName: path-entry "${dir}/${appName}.app"; 44 + system-app = app-in-dir "/System/Applications"; 45 + small-spacer = { 46 + tile-data = { }; 47 + tile-type = "small-spacer-tile"; 48 + }; 49 + }; 50 + 51 + /** 52 + Helper for issues with SSL certificates on various platforms. 53 + - https://github.com/NixOS/nixpkgs/issues/66716 54 + - https://github.com/NixOS/nixpkgs/issues/210223 55 + 56 + Not which are needed / relevant all the time, but I've seen a bunch 57 + of various resources refer to one or multiple of these... 58 + */ 59 + sslCertEnv = caBundle: { 60 + NIX_SSL_CERT_FILE = caBundle; 61 + SSL_CERT_FILE = caBundle; 62 + REQUESTS_CA_BUNDLE = caBundle; 63 + SYSTEM_CERTIFICATE_PATH = caBundle; 64 + GIT_SSL_CAINFO = caBundle; 65 + }; 66 + }
+8
.config/nvim/init.lua
··· 145 145 xmap <expr> i visualmode() ==# 'v' ? 'i' : 'mi' 146 146 xmap <expr> I visualmode() ==# 'v' ? 'I' : 'mI' 147 147 ]]) 148 + 149 + -- Equivalent of https://stackoverflow.com/a/5563142/14436105 for vscode tabs 150 + vim.keymap.set("n", "<Tab>", function() 151 + vscode.action("workbench.action.nextEditorInGroup") 152 + end, { silent = true }) 153 + vim.keymap.set("n", "<S-Tab>", function() 154 + vscode.action("workbench.action.previousEditorInGroup") 155 + end, { silent = true }) 148 156 end 149 157 150 158 -- firenvim
+1 -1
.config/yadm/.pre-commit-config.yaml
··· 37 37 hooks: 38 38 # Download from GH instead of building from scratch 39 39 - id: stylua-github 40 - args: [--config-path=~/.config/stylua.toml] 40 + args: [--config-path=.config/stylua.toml] 41 41 42 42 - repo: https://github.com/shellcheck-py/shellcheck-py 43 43 rev: v0.10.0.1