{
  flake.modules.nixos.kanata = {
    services.kanata = {
      enable = true;
      #TODO: move kanata config to module
      keyboards.remap-specials = {
        config = ''
          (deflocalkeys-linux
            ö 39
          )

          (defsrc
            a s d j k l ö
          )

          (defvar
            tap-time 200
            hold-time 200
          )

          (defalias
            a (tap-hold $tap-time $hold-time a lmet)
            s (tap-hold $tap-time $hold-time s lctl)
            d (tap-hold $tap-time $hold-time d lsft)
            k (tap-hold $tap-time $hold-time k rsft)
            l (tap-hold $tap-time $hold-time l rctl)
            ö (tap-hold $tap-time $hold-time ö ralt)

            activate (tap-dance $tap-time (j _ _ (layer-switch home-mods)))
            deactivate (tap-dance $tap-time (j _ _ (layer-switch base)))
          )

          (deflayer base
             a s d @activate k l ö
          )

          (deflayer home-mods
            @a @s @d @deactivate @k @l @ö
          )
        '';
        extraDefCfg = ''
          process-unmapped-keys yes
        '';
      };
    };
  };
}
