diff --git a/homes/x86_64-linux/harald@x1/default.nix b/homes/x86_64-linux/harald@x1/default.nix index ca75ab9..237c42d 100644 --- a/homes/x86_64-linux/harald@x1/default.nix +++ b/homes/x86_64-linux/harald@x1/default.nix @@ -18,6 +18,7 @@ tools = { git.enable = true; }; + gui.kbd.ellipsis.enable = true; }; fonts.fontconfig.enable = true; @@ -64,16 +65,6 @@ }; dconf.settings."org/gnome/desktop/input-sources".xkb-options = [ "mod:ellipsis" ]; - xdg.configFile."xkb/symbols/mod".text = '' - xkb_symbols "ellipsis" { - key { [ period, greater, ellipsis, division ] }; - }; - ''; - xdg.configFile."xkb/rules/evdev".text = '' - ! option = symbols - mod:ellipsis = +mod(ellipsis) - ! include %S/evdev - ''; xdg.enable = true; xdg.mime.enable = true; diff --git a/modules/home/gui/kbd/default.nix b/modules/home/gui/kbd/default.nix new file mode 100644 index 0000000..b404878 --- /dev/null +++ b/modules/home/gui/kbd/default.nix @@ -0,0 +1,25 @@ +{ config, lib, ... }: + +with lib; +let + cfg = config.metacfg.gui.kbd; +in +{ + options.metacfg.gui.kbd = { + ellipsis = mkEnableOption "ellipsis keybinding for period key"; + }; + + config = mkIf cfg.ellipsis { + xdg.configFile."xkb/symbols/mod".text = '' + xkb_symbols "ellipsis" { + key { [ period, greater, ellipsis, division ] }; + }; + ''; + + xdg.configFile."xkb/rules/evdev".text = '' + ! option = symbols + mod:ellipsis = +mod(ellipsis) + ! include %S/evdev + ''; + }; +} \ No newline at end of file