From 85905bf459997ade8ac258d4cc96553fcfc7a806 Mon Sep 17 00:00:00 2001 From: John Axel Eriksson Date: Sat, 16 Nov 2024 13:23:17 +0100 Subject: [PATCH] feat: darwin improvements (#998) --- darwin/aarch64-darwin/VW2WRF4694.nix | 15 +++++++-------- flake.lock | 13 ------------- flake.nix | 4 +--- flake/packages.nix | 8 -------- users/profiles/mac.nix | 2 +- users/profiles/wezterm/default.nix | 7 +++++++ 6 files changed, 16 insertions(+), 33 deletions(-) diff --git a/darwin/aarch64-darwin/VW2WRF4694.nix b/darwin/aarch64-darwin/VW2WRF4694.nix index c7d009d7..2aeb52e0 100644 --- a/darwin/aarch64-darwin/VW2WRF4694.nix +++ b/darwin/aarch64-darwin/VW2WRF4694.nix @@ -23,6 +23,7 @@ homebrew.brews = [ "spotify/sptaps/kubectl-site" "spotify/sptaps/hmtools" + "spotify/sptaps/protoman" ]; #services.karabiner-elements.enable = true; ## doesn't work atm @@ -34,12 +35,7 @@ system.defaults.NSGlobalDomain."com.apple.trackpad.trackpadCornerClickBehavior" = 1; system.defaults.NSGlobalDomain.InitialKeyRepeat = 15; system.defaults.NSGlobalDomain.KeyRepeat = 2; - - system.defaults.CustomSystemPreferences."com.apple.Terminal" = { - Shell = "/Users/johnaxele/.nushim.sh"; - "Default Window Settings" = "Pro"; - "Startup Window Settings" = "Pro"; - }; + system.defaults.NSGlobalDomain.ApplePressAndHoldEnabled = 0; services.tailscale.enable = true; @@ -94,10 +90,12 @@ environment.etc."zshrc.local".text = '' export PATH=/opt/homebrew/bin:$PATH + export SHELL=nu ''; environment.etc."bash.local".text = '' export PATH=/opt/homebrew/bin:$PATH + export SHELL=nu ''; home-manager.users.${adminUser.name} = { @@ -107,8 +105,9 @@ home.file.".nushim.sh" = { executable = true; text = '' - source /etc/bashrc - exec nu + source /etc/bashrc + export SHELL=nu + exec nu ''; }; home.packages = [ diff --git a/flake.lock b/flake.lock index 5e68216f..37d40eb1 100644 --- a/flake.lock +++ b/flake.lock @@ -806,18 +806,6 @@ "type": "github" } }, - "lsp-ai-bin": { - "flake": false, - "locked": { - "narHash": "sha256-3LTSOQUwVRrjUjFjlns11IPg+dyyIDCx32EvJESjJWI=", - "type": "file", - "url": "https://github.com/SilasMarvin/lsp-ai/releases/download/v0.7.1/lsp-ai-x86_64-unknown-linux-gnu.gz" - }, - "original": { - "type": "file", - "url": "https://github.com/SilasMarvin/lsp-ai/releases/download/v0.7.1/lsp-ai-x86_64-unknown-linux-gnu.gz" - } - }, "mac-app-util": { "inputs": { "cl-nix-lite": "cl-nix-lite", @@ -1420,7 +1408,6 @@ "impermanence": "impermanence", "juicefs-csi-driver": "juicefs-csi-driver", "kured": "kured", - "lsp-ai-bin": "lsp-ai-bin", "mac-app-util": "mac-app-util", "microvm": "microvm", "mk-shell-bin": "mk-shell-bin", diff --git a/flake.nix b/flake.nix index 77817cab..252fe3b9 100644 --- a/flake.nix +++ b/flake.nix @@ -72,8 +72,6 @@ juicefs-csi-driver.url = "https://raw.githubusercontent.com/juicedata/juicefs-csi-driver/v0.25.2/deploy/k8s.yaml"; # gh-release-update kured.flake = false; kured.url = "github:kubereboot/kured"; - lsp-ai-bin.flake = false; - lsp-ai-bin.url = "https://github.com/SilasMarvin/lsp-ai/releases/download/v0.7.1/lsp-ai-x86_64-unknown-linux-gnu.gz"; # gh-release-update mac-app-util.url = "github:hraban/mac-app-util"; microvm.url = "github:astro/microvm.nix"; microvm.inputs.flake-utils.follows = "flake-utils"; @@ -141,4 +139,4 @@ ]; systems = ["x86_64-linux" "aarch64-linux" "aarch64-darwin" "x86_64-darwin"]; }; -} \ No newline at end of file +} diff --git a/flake/packages.nix b/flake/packages.nix index 74729168..084e711c 100644 --- a/flake/packages.nix +++ b/flake/packages.nix @@ -81,14 +81,6 @@ p: map tofuProvider [p.null p.external p.hcloud p.cloudflare p.random p.tailscale] ); - lsp-ai = pkgs.runCommand "lsp-ai" {} '' - ls -lah - ls -lah ${inputs.lsp-ai-bin} - mkdir -p $out/bin - gunzip -c ${inputs.lsp-ai-bin} > $out/bin/lsp-ai - patchelf --set-interpreter "$(cat ${pkgs.gcc}/nix-support/dynamic-linker)" $out/bin/lsp-ai - chmod +x $out/bin/lsp-ai - ''; kexec-installer-nixos-unstable-noninteractive = kexec-installer inputs.nixpkgs [ ({ lib, diff --git a/users/profiles/mac.nix b/users/profiles/mac.nix index 218e9661..3afee1c5 100644 --- a/users/profiles/mac.nix +++ b/users/profiles/mac.nix @@ -10,7 +10,7 @@ in { ./git.nix ./gitui.nix ./emacs/default.nix - # ./helix.nix + ./helix.nix ./jujutsu.nix ./kubie.nix ./nushell/default.nix diff --git a/users/profiles/wezterm/default.nix b/users/profiles/wezterm/default.nix index 39302c1c..002f9fcd 100644 --- a/users/profiles/wezterm/default.nix +++ b/users/profiles/wezterm/default.nix @@ -41,6 +41,13 @@ in { else config = dofile("${home.homeDirectory}/${xdg.configFile."wezterm/wezterm.fnl.lua".target}") end + ${ + if pkgs.stdenv.isDarwin + then '' + config.front_end = "WebGpu" + '' + else "" + } return config ''; };