diff --git a/flake.lock b/flake.lock index a963538..91edfdb 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1760038930, - "narHash": "sha256-Oncbh0UmHjSlxO7ErQDM3KM0A5/Znfofj2BSzlHLeVw=", + "lastModified": 1761114652, + "narHash": "sha256-f/QCJM/YhrV/lavyCVz8iU3rlZun6d+dAiC3H+CDle4=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "0b4defa2584313f3b781240b29d61f6f9f7e0df3", + "rev": "01f116e4df6a15f4ccdffb1bcd41096869fb385c", "type": "github" }, "original": { diff --git a/hosts/puter/default.nix b/hosts/puter/default.nix index 8dbaac2..9bf9272 100644 --- a/hosts/puter/default.nix +++ b/hosts/puter/default.nix @@ -16,6 +16,7 @@ ../../modules/common/security.nix #../../modules/common/wine.nix ../../modules/common/libvirt.nix + ../../modules/common/keyd.nix ]; networking.hostName = "puter"; # This will be overridden by system/default.nix diff --git a/modules/common/keyd.nix b/modules/common/keyd.nix new file mode 100644 index 0000000..600c64c --- /dev/null +++ b/modules/common/keyd.nix @@ -0,0 +1,26 @@ +{ + config, + pkgs, + ... +}: { + services.keyd = { + enable = true; + keyboards = { + # The name is just the name of the configuration file, it does not really matter + default = { + ids = ["*"]; # what goes into the [id] section, here we select all keyboards + # Everything but the ID section: + settings = { + # The main layer, if you choose to declare it in Nix + main = { + capslock = "layer(LWin)"; # you might need to also enclose the key in quotes if it contains non-alphabetical symbols + }; + otherlayer = {}; + }; + extraConfig = '' + # put here any extra-config, e.g. you can copy/paste here directly a configuration, just remove the ids part + ''; + }; + }; + }; +}