From 26950332c7176f98e3a35273d6e8bdd7118a1352 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Tue, 19 Dec 2023 22:00:32 +0100 Subject: [PATCH] home: keyboard: extract from X module This deserves to be its own standalone module, as I would want to use it in both X and Wayland, etc... --- modules/home/default.nix | 1 + modules/home/{x => }/keyboard/default.nix | 6 +++++- modules/home/x/default.nix | 4 ---- 3 files changed, 6 insertions(+), 5 deletions(-) rename modules/home/{x => }/keyboard/default.nix (50%) diff --git a/modules/home/default.nix b/modules/home/default.nix index 8ba3a8d..4dcfc35 100644 --- a/modules/home/default.nix +++ b/modules/home/default.nix @@ -23,6 +23,7 @@ ./gtk ./htop ./jq + ./keyboard ./mail ./mpv ./nix diff --git a/modules/home/x/keyboard/default.nix b/modules/home/keyboard/default.nix similarity index 50% rename from modules/home/x/keyboard/default.nix rename to modules/home/keyboard/default.nix index 40af800..2216a08 100644 --- a/modules/home/x/keyboard/default.nix +++ b/modules/home/keyboard/default.nix @@ -1,8 +1,12 @@ { config, lib, ... }: let - cfg = config.my.home.x; + cfg = config.my.home.keyboard; in { + options.my.home.keyboard = with lib; { + enable = my.mkDisableOption "keyboard configuration"; + }; + config = lib.mkIf cfg.enable { home.keyboard = { layout = "fr"; diff --git a/modules/home/x/default.nix b/modules/home/x/default.nix index 0312bc4..c320e52 100644 --- a/modules/home/x/default.nix +++ b/modules/home/x/default.nix @@ -3,10 +3,6 @@ let cfg = config.my.home.x; in { - imports = [ - ./keyboard - ]; - options.my.home.x = with lib; { enable = mkEnableOption "X server configuration"; };