From ef9dc9f52658283c3078da0c27c7ecee92343f3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kier=C3=A1n=20Meinhardt?= Date: Sun, 22 Mar 2026 08:29:45 +0100 Subject: [PATCH] niri: simplify keyboard setup --- configs/keyboard/default.nix | 14 ++++++++------ flake.lock | 16 +++++----------- 2 files changed, 13 insertions(+), 17 deletions(-) diff --git a/configs/keyboard/default.nix b/configs/keyboard/default.nix index c2c9c68..8a909f6 100644 --- a/configs/keyboard/default.nix +++ b/configs/keyboard/default.nix @@ -5,7 +5,7 @@ ... }: let - niri-config-with = settings: (pkgs.niphas-niri.passthru.configuration.apply settings).wrapper; + niri-config-with = settings: pkgs.niphas-niri.passthru.configuration.apply settings; commaSep = builtins.concatStringsSep ","; xkbOptions = [ @@ -119,12 +119,14 @@ in elif [ -n "$NIRI_SOCKET" ]; then ${lib.getExe pkgs.niphas-niri} msg action load-config-file --path ${ (niri-config-with { - settings.input.keyboard.xkb = { - layout = "${defaultLanguage.code},${code}"; - variant = "${defaultLanguage.variant},${variant}"; - options = commaSep xkbOptions; + settings.input = lib.recursiveUpdate pkgs.niphas-niri.configuration.settings.input { + keyboard.xkb = { + layout = "${defaultLanguage.code},${code}"; + variant = "${defaultLanguage.variant},${variant}"; + options = commaSep xkbOptions; + }; }; - }).passthru.configuration."config.kdl".path + })."config.kdl".path } elif [ -n "$HYPRLAND_INSTANCE_SIGNATURE" ]; then hyprctl keyword input:kb_variant "" # otherwise we end up with an invalid combination for a short while diff --git a/flake.lock b/flake.lock index 2bbd5fa..0b096e3 100644 --- a/flake.lock +++ b/flake.lock @@ -489,7 +489,6 @@ }, "niphas": { "inputs": { - "niri": "niri", "nixpkgs": [ "nixpkgs-unstable" ], @@ -497,11 +496,11 @@ "wrappers": "wrappers" }, "locked": { - "lastModified": 1774116133, - "narHash": "sha256-lR6IPtSbw/+xME7TMCHXziis8Lxy6AAkRhRpDuVI33E=", + "lastModified": 1774129923, + "narHash": "sha256-JQlqnMzQb8YxyVFAjRE5Ftcyo45X9xnUbuI1lfRa5GQ=", "ref": "refs/heads/master", - "rev": "7dd94c7b96b9f8289e0decdf8d2f75f7b652ef3e", - "revCount": 53, + "rev": "e1d45bcf0b2783528d8276a6cd9452bcf410b803", + "revCount": 56, "type": "git", "url": "https://code.kmein.de/kfm/niphas" }, @@ -513,7 +512,6 @@ "niri": { "inputs": { "nixpkgs": [ - "niphas", "nixpkgs" ], "rust-overlay": "rust-overlay" @@ -799,10 +797,7 @@ "meteora": "meteora", "naersk": "naersk", "niphas": "niphas", - "niri": [ - "niphas", - "niri" - ], + "niri": "niri", "nix-index-database": "nix-index-database", "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs_3", @@ -843,7 +838,6 @@ "rust-overlay": { "inputs": { "nixpkgs": [ - "niphas", "niri", "nixpkgs" ]