Skip to content

Commit f414de7

Browse files
committed
nixos/neolight: init neolight
Modification to the XKB_CONFIG_ROOT environment variable required for functionnality of the package
1 parent a3eddc5 commit f414de7

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

nixos/modules/module-list.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1762,6 +1762,7 @@
17621762
./services/x11/hardware/synaptics.nix
17631763
./services/x11/hardware/wacom.nix
17641764
./services/x11/imwheel.nix
1765+
./services/x11/neolight.nix
17651766
./services/x11/picom.nix
17661767
./services/x11/redshift.nix
17671768
./services/x11/touchegg.nix
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
config,
3+
pkgs,
4+
lib,
5+
...
6+
}:
7+
8+
let
9+
cfg = config.services.xserver.xkb.neolight;
10+
in
11+
{
12+
options.services.xserver.xkb.neolight = {
13+
package = lib.mkPackageOption pkgs "neolight" { };
14+
enable = lib.mkEnableOption "neolight xkb layout, extra keyboard layers for programming based on Neo";
15+
};
16+
17+
config = lib.mkIf cfg.enable {
18+
environment.systemPackages = [ cfg.package ];
19+
environment.sessionVariables.XKB_CONFIG_ROOT = lib.mkForce "${cfg.package}/share/X11/xkb";
20+
21+
assertions = [
22+
{
23+
assertion = config.services.xserver.xkb.extraLayouts == { };
24+
message = "Neolight conflicts with xkb.extraLayouts";
25+
}
26+
];
27+
};
28+
29+
meta.maintainers = with lib.maintainers; [ drafolin ];
30+
}

0 commit comments

Comments
 (0)