feat(wl-kbptr): package wl-kbptr for NixOS as home module

This commit is contained in:
2026-03-29 16:25:49 +02:00
parent b321172044
commit 248756df77
4 changed files with 268 additions and 212 deletions

View File

@@ -19,6 +19,7 @@ in {
./swaync.nix
./theme.nix
./waybar.nix
./wl-kbptr.nix
./wlr-which-key.nix
./wlsunset.nix
];

View File

@@ -0,0 +1,37 @@
{
config,
lib,
pkgs,
...
}:
with lib; let
configDir = config.xdg.configHome;
cfg = config.home.desktop.wl-kbptr;
iniFormat = pkgs.formats.ini {};
in {
options.home.desktop.wl-kbptr = {
enable = mkEnableOption "enable wl-kbptr";
config = mkOption {
inherit (iniFormat) type;
default = {};
description = ''
Options to add to the {file}`config` file. See
<https://github.com/moverest/wl-kbptr/blob/main/config.example>
for options.
'';
example = {
general = {
home_row_keys = "abcd";
};
};
};
};
config = mkIf cfg.enable {
home = {
packages = [pkgs.wl-kbptr];
file."${configDir}/wl-kbptr/config" = mkIf (cfg.config != {}) {
source = iniFormat.generate "wl-kbptr-config" cfg.config;
};
};
};
}