nixos/keyd: add package option (#477200)

This commit is contained in:
Aleksana 2026-01-07 10:26:28 +00:00 committed by GitHub
commit 7599bbf2a3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -75,6 +75,8 @@ in
options.services.keyd = {
enable = lib.mkEnableOption "keyd, a key remapping daemon";
package = lib.mkPackageOption pkgs "keyd" { };
keyboards = lib.mkOption {
type = lib.types.attrsOf (lib.types.submodule keyboardOptions);
default = { };
@ -138,7 +140,7 @@ in
environment.KEYD_SOCKET = "/run/keyd/keyd.sock";
serviceConfig = {
ExecStart = "${pkgs.keyd}/bin/keyd";
ExecStart = lib.getExe' cfg.package "keyd";
Restart = "always";
# TODO investigate why it doesn't work propeprly with DynamicUser