From 994beb84e363a53bc21e673f7ffe2d071740e736 Mon Sep 17 00:00:00 2001 From: Anish Lakhwara Date: Wed, 4 Mar 2026 09:47:00 -0800 Subject: [PATCH] more darwin things --- home/darwin/default.nix | 15 ++++++---- home/profiles/opencode/agents/learn.md | 1 + home/profiles/opencode/default.nix | 1 + hosts/darwin/default.nix | 40 ++++++++++++++++++++------ 4 files changed, 44 insertions(+), 13 deletions(-) diff --git a/home/darwin/default.nix b/home/darwin/default.nix index 7b41ff7..50c6853 100644 --- a/home/darwin/default.nix +++ b/home/darwin/default.nix @@ -1,4 +1,9 @@ -{ self, pkgs, inputs, ... }: +{ + self, + pkgs, + inputs, + ... +}: { imports = [ ../profiles/nvim @@ -17,14 +22,14 @@ home.stateVersion = "22.05"; programs.zsh.initContent = '' - PATH=/Users/anishlakhwara/.sourcegraph/bin:/Users/anishlakhwara/.sourcegraph/sg.zsh_autocomplete:/Users/anishlakhwara/google-cloud-sdk/bin:/Users/anishlakhwara/google-cloud-sdk/completion.zsh.inc:/Users/anishlakhwara/google-cloud-sdk/path.zsh.inc:/Users/anishlakhwara/.sg:/opt/homebrew/bin:$PATH - ''; + PATH=/Users/anishlakhwara/.sourcegraph/bin:/Users/anishlakhwara/.sourcegraph/sg.zsh_autocomplete:/Users/anishlakhwara/google-cloud-sdk/bin:/Users/anishlakhwara/google-cloud-sdk/completion.zsh.inc:/Users/anishlakhwara/google-cloud-sdk/path.zsh.inc:/Users/anishlakhwara/go/bin:/opt/homebrew/bin:$PATH + ''; # Managing sketchybar plugins from home-manager home.file = { ".config/sketchybar" = { - source = ./sketchybar; - recursive = true; + source = ./sketchybar; + recursive = true; }; ".config/aerospace" = { source = ./aerospace; diff --git a/home/profiles/opencode/agents/learn.md b/home/profiles/opencode/agents/learn.md index b81e551..bbb6bce 100644 --- a/home/profiles/opencode/agents/learn.md +++ b/home/profiles/opencode/agents/learn.md @@ -11,6 +11,7 @@ tools: webfetch: true task: true skill: true + question: true --- You are a Socratic programming tutor. Your purpose is to guide the user's understanding through thoughtful questions and exploration, not to provide direct answers or write code for them. diff --git a/home/profiles/opencode/default.nix b/home/profiles/opencode/default.nix index 2e5c9fa..41e0001 100644 --- a/home/profiles/opencode/default.nix +++ b/home/profiles/opencode/default.nix @@ -24,6 +24,7 @@ in inputs.llm-agents.packages.${pkgs.system}.opencode inputs.llm-agents.packages.${pkgs.system}.tuicr inputs.llm-agents.packages.${pkgs.system}.chainlink + inputs.llm-agents.packages.${pkgs.system}.handy ]; # OpenCode configuration directory diff --git a/hosts/darwin/default.nix b/hosts/darwin/default.nix index bff4f40..253ca75 100644 --- a/hosts/darwin/default.nix +++ b/hosts/darwin/default.nix @@ -1,4 +1,10 @@ -{ self, pkgs, config, inputs, ... }: +{ + self, + pkgs, + config, + inputs, + ... +}: { imports = [ @@ -10,7 +16,7 @@ # ../../modules/shared/cachix ]; - environment.systemPackages = [ + environment.systemPackages = [ pkgs.go pkgs.python3 pkgs.cargo @@ -26,14 +32,23 @@ age.secrets.github-token.owner = "anishlakhwara"; age.secrets.anthropicToken.file = "${self}/secrets/anthropicToken.age"; age.secrets.anthropicToken.owner = "anishlakhwara"; + networking.wg-quick.interfaces = { wg0 = { address = [ "10.0.69.7/24" ]; listenPort = 60990; # to match firewall allowedUDPPorts (without this wg uses random port numbers) privateKeyFile = config.age.secrets.work-wg.path; - dns = [ "10.0.69.4" ]; + # dns = [ "10.0.69.4" ]; + postUp = '' + sudo mkdir -p /etc/resolver + echo "nameserver 10.0.69.4" | sudo tee /etc/resolver/mossnet.lan > /dev/null + sudo dscacheutil -flushcache + sudo killall -HUP mDNSResponder + ''; postDown = '' - sudo /usr/sbin/networksetup -setdnsservers Wi-Fi "Empty" + sudo rm -f /etc/resolver/mossnet.lan + sudo dscacheutil -flushcache + sudo killall -HUP mDNSResponder ''; peers = [ # For a client configuration, one peer entry for the server will suffice. @@ -56,12 +71,19 @@ # Setup user, packages, programs nix = { # package = pkgs.nixUnstable; - settings.trusted-users = [ "@admin" "anishlakhwara" ]; + settings.trusted-users = [ + "@admin" + "anishlakhwara" + ]; gc = { # user = "root"; # removed in newer nix-darwin automatic = true; - interval = { Weekday = 0; Hour = 2; Minute = 0; }; + interval = { + Weekday = 0; + Hour = 2; + Minute = 0; + }; options = "--delete-older-than 30d"; }; @@ -76,7 +98,7 @@ # Load configuration that is shared across systems # environment.systemPackages = with pkgs; [ - # + # # ] ++ (import ../../modules/shared/packages.nix { inherit pkgs; }); # Enable fonts dir @@ -94,9 +116,11 @@ nerd-fonts.iosevka ]; + security.pam.services.sudo_local.touchIdAuth = true; + system = { stateVersion = 4; - primaryUser = "anishlakhwara"; # required for newer nix-darwin + primaryUser = "anishlakhwara"; # required for newer nix-darwin keyboard = { enableKeyMapping = true; -- 2.51.2