summaryrefslogtreecommitdiffstats
path: root/nixos/modules
diff options
context:
space:
mode:
authorMichele Guerini Rocco <rnhmjoj@users.noreply.github.com>2023-11-03 13:49:14 +0100
committerGitHub <noreply@github.com>2023-11-03 13:49:14 +0100
commit5654dea8a5b5a9769916fbfc75f5449ad8f8d9c1 (patch)
treeb99aee09ed52c470c6fb2084c4d13676a6e6dd6a /nixos/modules
parent1b56805d9ef340854a73b6c69ea34582ea8331e1 (diff)
parent7d7744f15f8f5eef18abced9551754f2f70436e4 (diff)
Merge pull request #264787 from katexochen/feat/xkb-extralayouts
nixos/x11: move extraLayouts into xkb attrset
Diffstat (limited to 'nixos/modules')
-rw-r--r--nixos/modules/services/x11/extra-layouts.nix42
1 files changed, 25 insertions, 17 deletions
diff --git a/nixos/modules/services/x11/extra-layouts.nix b/nixos/modules/services/x11/extra-layouts.nix
index 3941f50b7550..ab7e39739eeb 100644
--- a/nixos/modules/services/x11/extra-layouts.nix
+++ b/nixos/modules/services/x11/extra-layouts.nix
@@ -3,7 +3,7 @@
with lib;
let
- layouts = config.services.xserver.extraLayouts;
+ layouts = config.services.xserver.xkb.extraLayouts;
layoutOpts = {
options = {
@@ -15,10 +15,10 @@ let
languages = mkOption {
type = types.listOf types.str;
description =
- lib.mdDoc ''
- A list of languages provided by the layout.
- (Use ISO 639-2 codes, for example: "eng" for english)
- '';
+ lib.mdDoc ''
+ A list of languages provided by the layout.
+ (Use ISO 639-2 codes, for example: "eng" for english)
+ '';
};
compatFile = mkOption {
@@ -80,29 +80,37 @@ let
};
xkb_patched = pkgs.xorg.xkeyboardconfig_custom {
- layouts = config.services.xserver.extraLayouts;
+ layouts = config.services.xserver.xkb.extraLayouts;
};
in
{
+ imports = [
+ (lib.mkRenamedOptionModuleWith {
+ sinceRelease = 2311;
+ from = [ "services" "xserver" "extraLayouts" ];
+ to = [ "services" "xserver" "xkb" "extraLayouts" ];
+ })
+ ];
+
###### interface
- options.services.xserver = {
+ options.services.xserver.xkb = {
extraLayouts = mkOption {
type = types.attrsOf (types.submodule layoutOpts);
- default = {};
+ default = { };
example = literalExpression
- ''
- {
- mine = {
- description = "My custom xkb layout.";
- languages = [ "eng" ];
- symbolsFile = /path/to/my/layout;
- };
- }
- '';
+ ''
+ {
+ mine = {
+ description = "My custom xkb layout.";
+ languages = [ "eng" ];
+ symbolsFile = /path/to/my/layout;
+ };
+ }
+ '';
description = lib.mdDoc ''
Extra custom layouts that will be included in the xkb configuration.
Information on how to create a new layout can be found here: