mirror of
https://codeberg.org/jopejoe1/nix-conf.git
synced 2025-06-07 13:29:22 +02:00
move nixos modules to nixos-modules
This commit is contained in:
parent
7394c5f317
commit
611796f02e
29 changed files with 225 additions and 7 deletions
32
nixos-modules/keyboard/default.nix
Normal file
32
nixos-modules/keyboard/default.nix
Normal file
|
@ -0,0 +1,32 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
cfg = config.jopejoe1.keyboard;
|
||||
in
|
||||
{
|
||||
options.jopejoe1.keyboard = {
|
||||
enable = lib.mkEnableOption "Enable Keyboard";
|
||||
layout = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "us";
|
||||
description = lib.mdDoc "Keyboard Layout.";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
services = {
|
||||
xserver = {
|
||||
xkb.layout = cfg.layout;
|
||||
};
|
||||
};
|
||||
console = {
|
||||
enable = true;
|
||||
keyMap = cfg.layout;
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue