From 9b4a4baff2cd4795d41d084a4351941577f07303 Mon Sep 17 00:00:00 2001 From: twoneis Date: Mon, 5 Aug 2024 18:53:10 +0200 Subject: [PATCH] only include extra layouts on request --- devices/inkvine/options.nix | 1 + modules/layout/default.nix | 5 ++++- modules/niri/niri.conf.nix | 4 ++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/devices/inkvine/options.nix b/devices/inkvine/options.nix index c176251..1f43870 100644 --- a/devices/inkvine/options.nix +++ b/devices/inkvine/options.nix @@ -4,6 +4,7 @@ niri.enable = true; games.enable = true; secureboot.enable = true; + extraLayout.enable = true; stateVersion = "24.05"; hmStateVersion = "24.11"; diff --git a/modules/layout/default.nix b/modules/layout/default.nix index 9cc58bf..f9ccc5e 100644 --- a/modules/layout/default.nix +++ b/modules/layout/default.nix @@ -1,4 +1,7 @@ -{ ... }: { +{ lib, config, ... }: let + inherit (lib) mkIf; + inherit (config.conf) extraLayout; +in mkIf extraLayout.enable { services.xserver.xkb = { layout = "us,custom"; options = "compose:ralt"; diff --git a/modules/niri/niri.conf.nix b/modules/niri/niri.conf.nix index ee1f73a..2254537 100644 --- a/modules/niri/niri.conf.nix +++ b/modules/niri/niri.conf.nix @@ -1,10 +1,10 @@ { config, ... }: let - inherit (config.conf) keys; + inherit (config.conf) keys extraLayout; in { input = { keyboard = { xkb = { - layout = "us,custom"; + layout = if extraLayout.enable then "us,custom" else "us"; options = "compose:ralt"; }; };