Update sway config and flake.nix

This commit is contained in:
2024-06-07 18:47:10 -05:00
parent 76e3492a30
commit 4a914da23e
14 changed files with 122 additions and 117 deletions

View File

@@ -28,6 +28,12 @@ in
type = types.enum [ "fish" ];
default = "fish";
};
caps = mkOption {
description = "What key to bind caps lock to";
type = types.enum [ "ctrl-esc" "esc" "caps" ];
default = "ctrl-esc";
};
};
@@ -42,6 +48,7 @@ in
eza
ripgrep
fzf
yazi
ncdu
btop
]
@@ -52,6 +59,19 @@ in
defaultEditor = true;
};
services.keyd = mkIf (cfg.caps != "caps") {
enable = true;
keyboards.default = {
ids = [ "*" ];
settings = {
main = mkMerge [
(mkIf (cfg.caps == "ctrl-esc") { capslock = "overload(control, esc)"; })
(mkIf (cfg.caps == "esc") { capslock = "esc"; })
];
};
};
};
programs.fish.enable = mkIf (cfg.shell == "fish") true;
};