Skip to content

Commit

Permalink
feat(home): add canary keyboard layout
Browse files Browse the repository at this point in the history
  • Loading branch information
yunfachi committed Dec 16, 2023
1 parent c857540 commit 5570ab7
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 4 deletions.
6 changes: 3 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion home/hyprland/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@ in {
) (config.yunfachi.monitors);

input = {
kb_layout = "us,ru";
kb_layout = "${
if config.yunfachi.canary.enable
then "canary"
else "us"
},ru";
kb_options = "grp:win_space_toggle";
follow_mouse = 1;
};
Expand Down
23 changes: 23 additions & 0 deletions nixos/canary.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
config,
lib,
pkgs-yunfachi,
...
}: let
cfg = config.hm.yunfachi.canary;
in {
config = lib.mkIf cfg.enable {
services.xserver = {
enable = true;
xkb = {
extraLayouts.canary = {
symbolsFile = pkgs-yunfachi.canary + "/share/X11/xkb/symbols/canary";
description = "Canary keyboard layout";
languages = ["eng"];
};
layout = "canary,ru";
};
};
console.useXkbConfig = true;
};
}
1 change: 1 addition & 0 deletions options/home/hardware.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
cfg = config.yunfachi;
in {
options.yunfachi = {
canary.enable = lib.mkEnableOption "canary" // {default = type == "desktop";};
monitors = mkOption {
type = types.listOf (types.submodule {
options = {
Expand Down

0 comments on commit 5570ab7

Please sign in to comment.