From eb40bafb6d81580d47b369cc573c5bce3e631613 Mon Sep 17 00:00:00 2001 From: TheGeneralist <180094941+thegeneralist01@users.noreply.github.com> Date: Fri, 5 Jun 2026 13:27:04 +0200 Subject: [PATCH 1/4] Split Karabiner remaps by built-in and G213 device --- modules/darwin/karabiner.nix | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/modules/darwin/karabiner.nix b/modules/darwin/karabiner.nix index e41cd7b..25d8341 100644 --- a/modules/darwin/karabiner.nix +++ b/modules/darwin/karabiner.nix @@ -68,7 +68,8 @@ let ]) numbers ); - simple_modifications = [ + # Swap Fn/Globe and left Control only on the built-in keyboard. + builtinKeyboardSimpleModifications = [ { from.apple_vendor_top_case_key_code = "keyboard_fn"; to = [ { key_code = "left_control"; } ]; @@ -85,7 +86,12 @@ let is_keyboard = true; }; + # Keep the G213's left Control as Fn and swap its Windows/Alt modifiers. logitechG213SimpleModifications = [ + { + from.key_code = "left_control"; + to = [ { apple_vendor_top_case_key_code = "keyboard_fn"; } ]; + } { from.key_code = "left_command"; to = [ { key_code = "left_option"; } ]; @@ -319,16 +325,19 @@ let name = "default"; selected = true; virtual_hid_keyboard.keyboard_type_v2 = "ansi"; - inherit simple_modifications; inherit complex_modifications; devices = [ { - identifiers = logitechG213Identifiers; - simple_modifications = logitechG213SimpleModifications; + identifiers = { + is_keyboard = true; + is_built_in_keyboard = true; + }; + simple_modifications = builtinKeyboardSimpleModifications; } { - identifiers.is_keyboard = true; + identifiers = logitechG213Identifiers; + simple_modifications = logitechG213SimpleModifications; } ]; } From e9ca3daa19820c8df3773eda3b4b41c89338b345 Mon Sep 17 00:00:00 2001 From: TheGeneralist <180094941+thegeneralist01@users.noreply.github.com> Date: Fri, 5 Jun 2026 14:14:55 +0200 Subject: [PATCH 2/4] Add Logitech mouse Karabiner mappings --- modules/darwin/karabiner.nix | 42 +++++++++++++++++++++++++++++++----- 1 file changed, 37 insertions(+), 5 deletions(-) diff --git a/modules/darwin/karabiner.nix b/modules/darwin/karabiner.nix index 25d8341..ff96197 100644 --- a/modules/darwin/karabiner.nix +++ b/modules/darwin/karabiner.nix @@ -86,12 +86,8 @@ let is_keyboard = true; }; - # Keep the G213's left Control as Fn and swap its Windows/Alt modifiers. + # Swap the G213's Windows/Alt modifiers. logitechG213SimpleModifications = [ - { - from.key_code = "left_control"; - to = [ { apple_vendor_top_case_key_code = "keyboard_fn"; } ]; - } { from.key_code = "left_command"; to = [ { key_code = "left_option"; } ]; @@ -102,6 +98,37 @@ let } ]; + logitechMouseIdentifiers = { + vendor_id = 1133; + product_id = 50503; + is_pointing_device = true; + }; + + logitechMouseSimpleModifications = [ + { + from.pointing_button = "button3"; + to = [ { apple_vendor_top_case_key_code = "keyboard_fn"; } ]; + } + { + from.pointing_button = "button4"; + to = [ + { + key_code = "open_bracket"; + modifiers = [ "left_command" ]; + } + ]; + } + { + from.pointing_button = "button5"; + to = [ + { + key_code = "close_bracket"; + modifiers = [ "left_command" ]; + } + ]; + } + ]; + complex_modifications = { name = "Complex Modifications"; rules = [ @@ -339,6 +366,11 @@ let identifiers = logitechG213Identifiers; simple_modifications = logitechG213SimpleModifications; } + { + identifiers = logitechMouseIdentifiers; + ignore = false; + simple_modifications = logitechMouseSimpleModifications; + } ]; } ]; From 7fd352124ecac6573a3f73a96cb0ddcff96bcf7a Mon Sep 17 00:00:00 2001 From: TheGeneralist <180094941+thegeneralist01@users.noreply.github.com> Date: Fri, 5 Jun 2026 14:17:15 +0200 Subject: [PATCH 3/4] Clarify Logitech mouse button mappings --- modules/darwin/karabiner.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/darwin/karabiner.nix b/modules/darwin/karabiner.nix index ff96197..102ccac 100644 --- a/modules/darwin/karabiner.nix +++ b/modules/darwin/karabiner.nix @@ -104,6 +104,7 @@ let is_pointing_device = true; }; + # Middle click sends Fn; side buttons navigate back and forward. logitechMouseSimpleModifications = [ { from.pointing_button = "button3"; From 9e366fe80b588e39f460bef7df61052b673c9dd3 Mon Sep 17 00:00:00 2001 From: TheGeneralist <180094941+thegeneralist01@users.noreply.github.com> Date: Fri, 5 Jun 2026 14:23:04 +0200 Subject: [PATCH 4/4] Update resolved DNS settings --- modules/linux/dns.nix | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/modules/linux/dns.nix b/modules/linux/dns.nix index d900e1f..deb39ec 100644 --- a/modules/linux/dns.nix +++ b/modules/linux/dns.nix @@ -1,14 +1,13 @@ { config, lib, ... }: let - inherit (lib) mkIf concatStringsSep; + inherit (lib) mkIf; in { services.resolved = mkIf (!config.isServer) { enable = true; - extraConfig = config.dnsServers - |> map (server: "DNS=${server}") - |> concatStringsSep "\n"; - - dnssec = "true"; - dnsovertls = "true"; + settings.Resolve = { + DNS = config.dnsServers; + DNSSEC = true; + DNSOverTLS = true; + }; }; }