From 0e3faccc53aa3a91e2f0c2094a86742cbb45ea7d Mon Sep 17 00:00:00 2001 From: Yorick Barbanneau Date: Tue, 7 May 2024 23:34:50 +0200 Subject: [PATCH] chore: found a better 'nix' way to create conf file --- hosts/morty/includes/home-manager.nix | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/hosts/morty/includes/home-manager.nix b/hosts/morty/includes/home-manager.nix index c1b26f1..5d156fd 100644 --- a/hosts/morty/includes/home-manager.nix +++ b/hosts/morty/includes/home-manager.nix @@ -1,19 +1,22 @@ {pkgs, ... }: -{ - home.file.".xkb/symbols/gpdwinmax".text = '' -default partial alphanumeric_keys -xkb_symbols "us-intl-winmax" { - name[group1] = "GPD Win Max us-inlt"; - include "us(altgr-intl)" - key { [ Multi_key ] }; - key { [ Tab ] }; - # include "level3(ralt_switch)" -}; +let + kbd_file = pkgs.writeText "gpdwinmax.kbd" + '' + default partial alphanumeric_keys + xkb_symbols "us-intl-winmax" { + name[group1] = "GPD Win Max us-inlt"; + include "us(altgr-intl)" + key { [ Multi_key ] }; + key { [ Tab ] }; + # include "level3(ralt_switch)" + }; ''; - +in +{ + wayland.windowManager.sway.checkConfig = false; wayland.windowManager.sway.config.input = { "1:1:AT_Translated_Set_2_keyboard" = { - xkb_layout = "gpdwinmax"; + xkb_layout = "${kbd_file}"; }; "1046:928:Goodix_Capacitive_TouchScreen" = { map_to_output = "eDP-1";