pinwheel: Add module for keyboard

This commit is contained in:
Alexander Heldt
2023-10-02 11:12:05 +02:00
parent f37bbdfa09
commit 14a574166d
3 changed files with 27 additions and 4 deletions

View File

@@ -7,6 +7,7 @@
./hardware-configuration.nix
./modules/light
./modules/sound
./modules/keyboard
./modules/age
./modules/ssh
./modules/git
@@ -89,9 +90,6 @@
hardware.opengl.enable = true;
programs.dconf.enable = true;
# Configure console keymap
console.keyMap = "sv-latin1";
# Define a user account. Don't forget to set a password with passwd.
users.users.alex = {
isNormalUser = true;
@@ -131,6 +129,7 @@
git.enable = true;
openvpn.enable = true;
go.enable = true;
keyboard.enable = true;
};
# This value determines the NixOS release from which the default

View File

@@ -13,7 +13,6 @@
home.packages = with pkgs; [
tig
onlyoffice-bin
qmk
];
home.stateVersion = "23.05";

View File

@@ -0,0 +1,25 @@
{ pkgs, lib, config, ... }:
let
enabled = config.mod.keyboard.enable;
in
{
options = {
mod.keyboard = {
enable = lib.mkEnableOption "add keyboard module";
};
};
config = lib.mkIf enabled {
console.keyMap = "sv-latin1";
hardware.keyboard.qmk.enable = true;
hardware.keyboard.zsa.enable = true;
home-manager.users.alex = {
home.packages = [
pkgs.qmk
pkgs.wally-cli
];
};
};
}