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
···11{
22 "folders": [
33- // Without https://github.com/microsoft/vscode/issues/869 this is really annoying:
33+ // Without one of these it's annoying to include the flake.nix file
44+ // - https://github.com/microsoft/vscode/issues/869
55+ // - https://github.com/microsoft/vscode/issues/45177
46 // {
57 // "path": "."
68 // },
···2022 "path": "nixpkgs"
2123 },
2224 ],
2323- "settings": {}
2525+ "settings": {},
2426}
+1-49
.config/flake.nix
···9191 };
9292 in
9393 {
9494- # Helper functions that aren't in upstream nixpkgs.lib. It would be nice
9595- # for this to be usable as a module that extends nixpkgs.lib for the
9696- # appropriate `pkgs`, but for now `self.lib` is good enough
9797- lib = {
9898- /** Return the given value if non-null, otherwise the given `default` */
9999- unwrapOr = default: v:
100100- if v == null then default else v;
101101-102102- /** Filter a list of paths to include only those that actually exist */
103103- existingPaths = builtins.filter builtins.pathExists;
104104-105105- /** Enable "escape sequences" in a string by (ab)using the builtin Nix JSON parser.
106106- For readability / sanity, this should probably only ever be used with a
107107- single-quoted '' literals for backslashes to work as expected.
108108- <https://github.com/NixOS/nix/issues/10082>
109109- */
110110- unescape = s:
111111- let escaped = builtins.replaceStrings [ "\"" ] [ "\\\"" ] s;
112112- in builtins.fromJSON ''"${escaped}"'';
113113-114114- /** com.apple.dock helpers */
115115- dock = with self.lib.dock; {
116116- path-entry = path: {
117117- tile-data = {
118118- file-data = {
119119- _CFURLString = "${path}";
120120- _CFURLStringType = 0;
121121- };
122122- };
123123- };
124124-125125- folder = path: lib.recursiveUpdate (path-entry path) {
126126- tile-data = {
127127- # Show as folder icon instead of stack etc.
128128- displayas = 1;
129129- # Use default appearance for contents, set 2 to force grid here
130130- showas = 0;
131131- };
132132- tile-type = "directory-tile";
133133- };
134134-135135- app-in-dir = dir: appName: path-entry "${dir}/${appName}.app";
136136- system-app = app-in-dir "/System/Applications";
137137- small-spacer = {
138138- tile-data = { };
139139- tile-type = "small-spacer-tile";
140140- };
141141- };
142142- };
9494+ lib = import ./nix/lib.nix (inputs // { inherit lib; });
1439514496 darwinConfigurations = mapAttrs
14597 (hostname: { system, user, ... }: nix-darwin.lib.darwinSystem {
···11+# Helper functions that aren't in upstream nixpkgs.lib. It would be nice
22+# for this to be usable as a module that extends nixpkgs.lib for the
33+# appropriate `pkgs`, but for now `self.lib` is good enough
44+{ self, lib, ... }:
55+{
66+ /** Return the given value if non-null, otherwise the given `default` */
77+ unwrapOr = default: v:
88+ if v == null then default else v;
99+1010+ /** Filter a list of paths to include only those that actually exist */
1111+ existingPaths = builtins.filter builtins.pathExists;
1212+1313+ /** Enable "escape sequences" in a string by (ab)using the builtin Nix JSON parser.
1414+ For readability / sanity, this should probably only ever be used with a
1515+ single-quoted '' literals for backslashes to work as expected.
1616+ <https://github.com/NixOS/nix/issues/10082>
1717+ */
1818+ unescape = s:
1919+ let escaped = builtins.replaceStrings [ "\"" ] [ "\\\"" ] s;
2020+ in builtins.fromJSON ''"${escaped}"'';
2121+2222+ /** com.apple.dock helpers */
2323+ dock = with self.lib.dock; {
2424+ path-entry = path: {
2525+ tile-data = {
2626+ file-data = {
2727+ _CFURLString = "${path}";
2828+ _CFURLStringType = 0;
2929+ };
3030+ };
3131+ };
3232+3333+ folder = path: lib.recursiveUpdate (path-entry path) {
3434+ tile-data = {
3535+ # Show as folder icon instead of stack etc.
3636+ displayas = 1;
3737+ # Use default appearance for contents, set 2 to force grid here
3838+ showas = 0;
3939+ };
4040+ tile-type = "directory-tile";
4141+ };
4242+4343+ app-in-dir = dir: appName: path-entry "${dir}/${appName}.app";
4444+ system-app = app-in-dir "/System/Applications";
4545+ small-spacer = {
4646+ tile-data = { };
4747+ tile-type = "small-spacer-tile";
4848+ };
4949+ };
5050+5151+ /**
5252+ Helper for issues with SSL certificates on various platforms.
5353+ - https://github.com/NixOS/nixpkgs/issues/66716
5454+ - https://github.com/NixOS/nixpkgs/issues/210223
5555+5656+ Not which are needed / relevant all the time, but I've seen a bunch
5757+ of various resources refer to one or multiple of these...
5858+ */
5959+ sslCertEnv = caBundle: {
6060+ NIX_SSL_CERT_FILE = caBundle;
6161+ SSL_CERT_FILE = caBundle;
6262+ REQUESTS_CA_BUNDLE = caBundle;
6363+ SYSTEM_CERTIFICATE_PATH = caBundle;
6464+ GIT_SSL_CAINFO = caBundle;
6565+ };
6666+}