about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--home/profiles/gui/config/sway.nix2
-rw-r--r--modules/keyd-qol.nix36
-rw-r--r--nixos/alpha/configuration.nix2
-rw-r--r--nixos/default.nix1
4 files changed, 40 insertions, 1 deletions
diff --git a/home/profiles/gui/config/sway.nix b/home/profiles/gui/config/sway.nix
index 3671ed3..174b47e 100644
--- a/home/profiles/gui/config/sway.nix
+++ b/home/profiles/gui/config/sway.nix
@@ -230,7 +230,7 @@ with neotheme.colors;
     repeat_delay 350
     xkb_layout us
     # xkb_variant ,dvorak
-    xkb_options 'grp:alt_shift_toggle,caps:escape'
+    # xkb_options 'grp:alt_shift_toggle,caps:escape'
     # xkb_options ctrl:swapcaps
   }
 ''
diff --git a/modules/keyd-qol.nix b/modules/keyd-qol.nix
new file mode 100644
index 0000000..e163286
--- /dev/null
+++ b/modules/keyd-qol.nix
@@ -0,0 +1,36 @@
+{ config, pkgs, unstable, unstable-small, nixpkgs-2211, lib, ... }:
+
+{
+  options.services.keyd-qol.enable = lib.mkEnableOption "keyd service for quality-of-life improvements";
+
+  config = lib.mkIf config.services.keyd-qol.enable {
+    services.keyd.enable = true;
+
+    services.keyd.keyboards = {
+      default = {
+        ids = [ "*" ];
+        settings = {
+          main = {
+            capslock = "overload(control, esc)";
+
+            insert = "S-insert";
+          };
+        };
+      };
+
+      sun = {
+        ids = [
+          # HHKB Hybrid
+          "04fe:0021"
+        ];
+        settings = {
+          main = {
+            control = "overload(control, esc)";
+
+            insert = "S-insert";
+          };
+        };
+      };
+    };
+  };
+}
diff --git a/nixos/alpha/configuration.nix b/nixos/alpha/configuration.nix
index ca69a37..2dbcb0a 100644
--- a/nixos/alpha/configuration.nix
+++ b/nixos/alpha/configuration.nix
@@ -162,6 +162,8 @@
   hardware.bluetooth.enable = true;
   hardware.logitech.wireless.enable = true;
 
+  services.keyd-qol.enable = true;
+
   services.udev.extraRules = ''
     # Logitech receiver for superlight, causes premature wakeup from suspend
     ACTION=="add", SUBSYSTEM=="usb", DRIVERS=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c547", ATTR{power/wakeup}="disabled"
diff --git a/nixos/default.nix b/nixos/default.nix
index ed40dad..86ab055 100644
--- a/nixos/default.nix
+++ b/nixos/default.nix
@@ -7,6 +7,7 @@
     extraModules = [
       ../modules/security.nix
       ../modules/cachix
+      ../modules/keyd-qol.nix
       inputs.sops-nix.nixosModules.sops
     ];
   };