From ca9fbceabbba46d594419a40d188c6e371f2f39e Mon Sep 17 00:00:00 2001 From: Kenichi Kamiya Date: Thu, 31 Oct 2024 13:43:25 +0900 Subject: [PATCH 1/3] Revert "Install vscode in macOS via nixpkgs (#882)" This reverts commit 685f6ab363e25a69cea7bfcfbb7dcd0562f840c7. --- home-manager/darwin.nix | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/home-manager/darwin.nix b/home-manager/darwin.nix index dba00689..1cf4cf8e 100644 --- a/home-manager/darwin.nix +++ b/home-manager/darwin.nix @@ -12,12 +12,10 @@ lib.mkMerge [ (lib.mkIf pkgs.stdenv.isDarwin { home = { sessionVariables = { - # ## If you prefer zed - # * Do not specify Nix store path for zed in macOS - # https://github.com/NixOS/nixpkgs/blob/bba8dffd3135f35810e9112c40ee621f4ede7cca/pkgs/by-name/ze/zed-editor/package.nix#L217-L219 - # * `cli: install` action installs into this path in macOS - # VISUAL = "zed --wait"; - VISUAL = lib.getExe edge-pkgs.vscode; + # * Do not specify Nix store path for zed in macOS + # https://github.com/NixOS/nixpkgs/blob/bba8dffd3135f35810e9112c40ee621f4ede7cca/pkgs/by-name/ze/zed-editor/package.nix#L217-L219 + # * `cli: install` action installs into this path in macOS + VISUAL = "zed --wait"; BROWSER = "open"; }; @@ -57,8 +55,6 @@ lib.mkMerge [ edge-pkgs.podman-desktop # Useable since https://github.com/NixOS/nixpkgs/pull/343648 - edge-pkgs.vscode # Keep latest as possible - edge-pkgs.signal-desktop # Useable since https://github.com/NixOS/nixpkgs/pull/348165 homemade-pkgs.maccy From 4f2e57bf3930db2272bf9d35ae1351c34368f68f Mon Sep 17 00:00:00 2001 From: Kenichi Kamiya Date: Thu, 31 Oct 2024 13:45:03 +0900 Subject: [PATCH 2/3] Revert "Install signal-desktop in macOS via nixpkgs (#861)" This reverts commit 4561a84226d2c1d227d4f862a364a6cf9920c7f5. --- flake.nix | 45 +++++++++++------------------------------ home-manager/darwin.nix | 2 -- 2 files changed, 12 insertions(+), 35 deletions(-) diff --git a/flake.nix b/flake.nix index 173a91f9..78041463 100644 --- a/flake.nix +++ b/flake.nix @@ -207,42 +207,21 @@ }; }; - x86-macOS = - let - system = "x86_64-darwin"; - in - { - pkgs = nixpkgs.legacyPackages.${system}; - extraSpecialArgs = { - homemade-pkgs = homemade-packages.${system}; - edge-pkgs = import edge-nixpkgs { - inherit system; - config = { - # Atleast required for following - # signal-desktop: https://github.com/NixOS/nixpkgs/pull/348165/files#diff-05921dc46b537c59c8a76dfc3c3e9a3a1fd93345ee5bff8573aae36dedf719bcR49 - # android-studio: https://github.com/NixOS/nixpkgs/blob/3490095db7c455272ee96c1d99d424d029bdf576/pkgs/applications/editors/android-studio/common.nix#L281 - allowUnfree = true; - }; - }; - }; + x86-macOS = { + pkgs = nixpkgs.legacyPackages.x86_64-darwin; + extraSpecialArgs = { + homemade-pkgs = homemade-packages.x86_64-darwin; + edge-pkgs = edge-nixpkgs.legacyPackages.x86_64-darwin; }; + }; - aarch64-macOS = - let - system = "aarch64-darwin"; - in - { - pkgs = nixpkgs.legacyPackages.${system}; - extraSpecialArgs = { - homemade-pkgs = homemade-packages.${system}; - edge-pkgs = import edge-nixpkgs { - inherit system; - config = { - allowUnfree = true; - }; - }; - }; + aarch64-macOS = { + pkgs = nixpkgs.legacyPackages.aarch64-darwin; + extraSpecialArgs = { + homemade-pkgs = homemade-packages.aarch64-darwin; + edge-pkgs = edge-nixpkgs.legacyPackages.aarch64-darwin; }; + }; in { "kachick@desktop" = home-manager.lib.homeManagerConfiguration ( diff --git a/home-manager/darwin.nix b/home-manager/darwin.nix index 1cf4cf8e..c34ad2fe 100644 --- a/home-manager/darwin.nix +++ b/home-manager/darwin.nix @@ -55,8 +55,6 @@ lib.mkMerge [ edge-pkgs.podman-desktop # Useable since https://github.com/NixOS/nixpkgs/pull/343648 - edge-pkgs.signal-desktop # Useable since https://github.com/NixOS/nixpkgs/pull/348165 - homemade-pkgs.maccy ]; }; From 946f378a77288c95e3db2501d7af6a197db6e051 Mon Sep 17 00:00:00 2001 From: Kenichi Kamiya Date: Thu, 31 Oct 2024 13:46:57 +0900 Subject: [PATCH 3/3] Make vscode as the default editor in macOS again --- home-manager/darwin.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/home-manager/darwin.nix b/home-manager/darwin.nix index c34ad2fe..300a3c82 100644 --- a/home-manager/darwin.nix +++ b/home-manager/darwin.nix @@ -12,10 +12,11 @@ lib.mkMerge [ (lib.mkIf pkgs.stdenv.isDarwin { home = { sessionVariables = { - # * Do not specify Nix store path for zed in macOS - # https://github.com/NixOS/nixpkgs/blob/bba8dffd3135f35810e9112c40ee621f4ede7cca/pkgs/by-name/ze/zed-editor/package.nix#L217-L219 + # * Do not specify Nix store path for zed and vscode in macOS + # * zed is broken https://github.com/NixOS/nixpkgs/blob/bba8dffd3135f35810e9112c40ee621f4ede7cca/pkgs/by-name/ze/zed-editor/package.nix#L217-L219 + # * vscode is unfree and heavy when no binary cache # * `cli: install` action installs into this path in macOS - VISUAL = "zed --wait"; + VISUAL = "code --wait"; BROWSER = "open"; };