From 9a67c5444ed990f1d5e2d8752683c657acb5f465 Mon Sep 17 00:00:00 2001 From: jmug Date: Sun, 17 Aug 2025 19:07:18 -0700 Subject: [PATCH 1/7] Don't sign off commits with lazygit. Signed-off-by: jmug --- home-modules/lazygit.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/home-modules/lazygit.nix b/home-modules/lazygit.nix index 1160e30..d946268 100644 --- a/home-modules/lazygit.nix +++ b/home-modules/lazygit.nix @@ -2,7 +2,7 @@ programs.lazygit = { enable = true; settings = { - git.commit.signOff = true; + # git.commit.signOff = true; git.autoFetch = false; git.autoRefresh = false; keybinding = { From 448682a854f22f90e2ae435888007d27e0fa5bc8 Mon Sep 17 00:00:00 2001 From: jmug Date: Sun, 17 Aug 2025 19:08:28 -0700 Subject: [PATCH 2/7] Add notes for YubiKey in Darwin. Signed-off-by: jmug --- modules/nixos/yubikey/default.nix | 44 +++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/modules/nixos/yubikey/default.nix b/modules/nixos/yubikey/default.nix index 20be05e..b5c0260 100644 --- a/modules/nixos/yubikey/default.nix +++ b/modules/nixos/yubikey/default.nix @@ -1,4 +1,48 @@ # This module supports multiple YubiKey 4 and/or 5 devices as well as a single Yubico Security Key device. The limitation to a single Security Key is because they do not have serial numbers and therefore the scripts in this module cannot uniquely identify them. See options.yubikey.identifies.description below for information on how to add a 'mock' serial number for a single Security key. Additional context is available in Issue 14 https://github.com/EmergentMind/nix-config/issues/14 +# +# LINUX ONLY: This module uses udev rules for hotplug detection which are not available on macOS. +# For Darwin/macOS YubiKey support, consider these alternatives: +# +# 1. Launch Agents (Recommended): +# - Use nix-darwin's launchd.agents with StartInterval for polling +# - Monitor via `system_profiler SPUSBDataType | grep Yubico` +# - More reliable than manual scripts, integrates with macOS services +# +# Example implementation: +# launchd.agents.yubikey-monitor = { +# enable = true; +# config = { +# ProgramArguments = [ +# "${pkgs.bash}/bin/bash" +# "-c" +# "system_profiler SPUSBDataType | grep -q 'Yubico' && ${yubikey-up}/bin/yubikey-up || ${yubikey-down}/bin/yubikey-down" +# ]; +# StartInterval = 5; # Check every 5 seconds +# RunAtLoad = true; +# }; +# }; +# +# 2. IOKit Notifications (Advanced): +# - Write daemon using IOKit's IOServiceAddMatchingNotification +# - Monitors USB device attach/detach events directly +# - Requires C/Swift code or Python with pyobjc +# - Most responsive but significantly more complex +# +# 3. Hybrid Approach: +# - Launch Agent for background monitoring +# - Manual shell aliases/functions for immediate response +# - Login hooks via system.activationScripts.postUserActivation +# +# Example login hook: +# system.activationScripts.postUserActivation.text = '' +# # Run yubikey detection on login +# if command -v ykman >/dev/null 2>&1; then +# ${yubikey-up}/bin/yubikey-up || true +# fi +# ''; +# +# The Darwin configs currently only install yubico-authenticator via Homebrew +# and lack the automatic SSH key management provided by this Linux module. { config, pkgs, From fa9ddb4c785d06df785e772f0fcd939086cdd1fe Mon Sep 17 00:00:00 2001 From: jmug Date: Sun, 17 Aug 2025 19:09:06 -0700 Subject: [PATCH 3/7] [macbook] Dispaly sleep. Signed-off-by: jmug --- hosts/macbook/configuration.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hosts/macbook/configuration.nix b/hosts/macbook/configuration.nix index 284b24c..0a71cc7 100644 --- a/hosts/macbook/configuration.nix +++ b/hosts/macbook/configuration.nix @@ -11,6 +11,8 @@ sudo -u ${config.user.name} /System/Library/PrivateFrameworks/SystemAdministration.framework/Resources/activateSettings -u ''; + power.sleep.display = 10; + # Popups for special characters for some keys. system.defaults.NSGlobalDomain.ApplePressAndHoldEnabled = false; From dee6da7e99e16c2af9a7d352c39245f1304e28bd Mon Sep 17 00:00:00 2001 From: jmug Date: Sun, 17 Aug 2025 19:09:26 -0700 Subject: [PATCH 4/7] [macbook] Add watchman and whatsapp. Signed-off-by: jmug --- hosts/macbook/configuration.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hosts/macbook/configuration.nix b/hosts/macbook/configuration.nix index 0a71cc7..2be7ac7 100644 --- a/hosts/macbook/configuration.nix +++ b/hosts/macbook/configuration.nix @@ -39,9 +39,9 @@ no_quarantine = true; }; - taps = []; brews = [ "raylib" + "watchman" ]; casks = [ "ghostty" @@ -57,6 +57,7 @@ "nrf-connect" "segger-jlink" "docker-desktop" + "whatsapp" ]; }; From 7f6a5b35b4889d4a722a6b9f06d1839ba99b7295 Mon Sep 17 00:00:00 2001 From: jmug Date: Sun, 17 Aug 2025 19:11:30 -0700 Subject: [PATCH 5/7] [macbook] Add go and node for expo. Signed-off-by: jmug --- hosts/macbook/home.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hosts/macbook/home.nix b/hosts/macbook/home.nix index 017ec0a..7bc22b1 100644 --- a/hosts/macbook/home.nix +++ b/hosts/macbook/home.nix @@ -62,7 +62,12 @@ in { pkgs-unstable.vscode pkgs-unstable.go + pkgs-unstable.gopls + pkgs-unstable.gotools pkgs-unstable.bun + # Expo. + pkgs-unstable.nodejs_24 + pkgs-unstable.eas-cli ]; stateVersion = "24.11"; From c673c4abd1f59d6349ced72fb02f5efc67e2f35e Mon Sep 17 00:00:00 2001 From: jmug Date: Sun, 17 Aug 2025 19:11:47 -0700 Subject: [PATCH 6/7] [macbook] Add opencode local. Signed-off-by: jmug --- hosts/macbook/home.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hosts/macbook/home.nix b/hosts/macbook/home.nix index 7bc22b1..9e84e84 100644 --- a/hosts/macbook/home.nix +++ b/hosts/macbook/home.nix @@ -83,7 +83,12 @@ in { rshellconf = "source ${homeDirectory}/.zshrc"; nrsw = "sudo darwin-rebuild switch --flake ${homeDirectory}/nixos#macbook"; - opencode = "/Users/jmug/dev/opencode/dist-local/bin/opencode"; # Replace with the app. + opencode-local = "/Users/jmug/dev/opencode/dist-local/bin/opencode"; # Replace with the app. }; + + initContent = '' + export PATH=$PATH:$HOME/bin + export PATH=$PATH:$HOME/.opencode/bin + ''; }; } From 5d5cbcfa8894d621caddfd7f8213a8d25e0febf7 Mon Sep 17 00:00:00 2001 From: jmug Date: Sun, 17 Aug 2025 19:12:26 -0700 Subject: [PATCH 7/7] Ask for permissions for webfetch. Signed-off-by: jmug --- home-modules/opencode-config.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/home-modules/opencode-config.nix b/home-modules/opencode-config.nix index 3d9bd3e..32cf53f 100644 --- a/home-modules/opencode-config.nix +++ b/home-modules/opencode-config.nix @@ -5,12 +5,12 @@ "$schema": "https://opencode.ai/config.json", "permission": { "edit": "ask", + "webfetch": "ask", "bash": { "git status": "allow", "git diff": "allow", "ls": "allow", - "pwd": "allow", - "*": "ask" + "pwd": "allow" } } }