aboutsummaryrefslogtreecommitdiff
path: root/nixos
diff options
context:
space:
mode:
authorStefan Weigl-Bosker <stefan@s00.xyz>2025-06-24 13:09:23 -0400
committerStefan Weigl-Bosker <stefan@s00.xyz>2025-06-24 13:09:23 -0400
commit2a9a6f104b95789ed218942bcf30f8b22ffda0f9 (patch)
tree26e9376f39c040f888fbf66964c61c84d85e41f3 /nixos
parent75004dba3efc9302c61f399c4ffc7a6d4d5c19c1 (diff)
downloadhome-2a9a6f104b95789ed218942bcf30f8b22ffda0f9.tar.gz
nixos/keyd: init
Diffstat (limited to 'nixos')
-rw-r--r--nixos/default.nix2
-rw-r--r--nixos/keyd.nix83
2 files changed, 84 insertions, 1 deletions
diff --git a/nixos/default.nix b/nixos/default.nix
index 345cdea..e31a96a 100644
--- a/nixos/default.nix
+++ b/nixos/default.nix
@@ -6,7 +6,7 @@ in
imports = [
./bluetooth.nix
./osu.nix
- # ./kmonad.nix
+ ./keyd.nix
];
options.nixos = with lib.options; {
diff --git a/nixos/keyd.nix b/nixos/keyd.nix
new file mode 100644
index 0000000..8a17590
--- /dev/null
+++ b/nixos/keyd.nix
@@ -0,0 +1,83 @@
+{ config, lib, inputs, pkgs, ...}:
+let
+ cfg = config.nixos.keyd;
+in
+{
+ options.nixos.keyd = {
+ enable = lib.mkOption {
+ description = "enable the keyd module";
+ type = lib.types.bool;
+ default = true;
+ };
+ };
+
+ config = lib.mkIf cfg.enable {
+ services.keyd = {
+ enable = true;
+ keyboards = {
+ defaults = {
+ ids = [ "*" ];
+ settings = {
+ main = {
+ capslock = "overload(control, esc)";
+ # esc = "capslock";
+ leftcontrol = "layer(nav)";
+ leftalt = "overload(leftalt, tab)"; # TODO: tab not working
+ rightalt = "overload(symbols, enter)";
+ rightcontrol = "overload(symbols, backspace)";
+ # homerow mods
+ # a = "lettermod(meta, a, 150, 200)";
+ # s = "lettermod(alt, s, 150, 200)";
+ # d = "lettermod(control, d, 150, 200)";
+ # f = "lettermod(shift, f, 150, 200)";
+ #
+ # j = "lettermod(shift, j, 150, 200)";
+ # k = "lettermod(control, k, 150, 200)";
+ # l = "lettermod(alt, l, 150, 200)";
+ # ";" = "lettermod(meta, ;, 150, 200)";
+ };
+ nav = {
+ h = "left";
+ j = "down";
+ k = "up";
+ l = "right";
+ };
+ symbols = {
+ q = "[";
+ w = "&";
+ e = "*";
+ r = "(";
+ t = "]";
+ a = ";";
+ s = "$";
+ d = "%";
+ f = "^";
+ g = "=";
+ z = "`";
+ x = "!";
+ c = "@";
+ v = "#";
+ b = "\\";
+ leftmeta = "(";
+ leftalt = ")";
+ space = "-";
+ };
+ "symbols+shift" = {
+ q = "{";
+ t = "}";
+ a = ":";
+ s = ''"'';
+ d = "'";
+ g = "+";
+ z = "~";
+ b = "|";
+ space = "_";
+ };
+ };
+ extraConfig = ''
+ '';
+ };
+ };
+ };
+ };
+}