1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-18 03:30:45 +00:00

Merge pull request #318060 from NixOS/backport-316275-to-release-24.05

[Backport release-24.05] lomiri.lomiri: Try to consider services.xserver.xkb.layout
This commit is contained in:
Cosima Neidahl 2024-06-07 22:27:26 +02:00 committed by GitHub
commit d7a4002318
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 34 additions and 0 deletions

View file

@ -37,6 +37,10 @@ in {
suru-icon-theme
# telephony-service # currently broken: https://github.com/NixOS/nixpkgs/pull/314043
]);
variables = {
# To override the keyboard layouts in Lomiri
NIXOS_XKB_LAYOUTS = config.services.xserver.xkb.layout;
};
};
hardware.pulseaudio.enable = lib.mkDefault true;

View file

@ -0,0 +1,29 @@
From 640cab41986fac83742af39dd19877041a2ab8dc Mon Sep 17 00:00:00 2001
From: OPNA2608 <opna2608@protonmail.com>
Date: Sat, 1 Jun 2024 00:22:27 +0200
Subject: [PATCH] Check NIXOS_XKB_LAYOUTS for layouts before falling back to
"us"
---
plugins/AccountsService/AccountsService.cpp | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/plugins/AccountsService/AccountsService.cpp b/plugins/AccountsService/AccountsService.cpp
index bcf18246c..f4a7dfaa1 100644
--- a/plugins/AccountsService/AccountsService.cpp
+++ b/plugins/AccountsService/AccountsService.cpp
@@ -295,6 +295,11 @@ QStringList AccountsService::keymaps() const
return simplifiedMaps;
}
+ char* fallbackNixosLayouts = getenv("NIXOS_XKB_LAYOUTS");
+ if (fallbackNixosLayouts != NULL && fallbackNixosLayouts[0] != '\0') {
+ return QString(fallbackNixosLayouts).split(QLatin1Char(','), Qt::SkipEmptyParts);
+ }
+
return {QStringLiteral("us")};
}
--
2.42.0

View file

@ -117,6 +117,7 @@ stdenv.mkDerivation (finalAttrs: {
})
./9901-lomiri-Disable-Wizard.patch
./9902-lomiri-Check-NIXOS_XKB_LAYOUTS.patch
];
postPatch = ''