Modularize nixos and home-manager packages
This commit is contained in:
parent
b0979afa53
commit
51d2c2aa7c
32 changed files with 713 additions and 482 deletions
23
modules/programs/layout.nix
Normal file
23
modules/programs/layout.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{ lib, options, config, ... }: {
|
||||
options.mods.xkb = {
|
||||
layout = lib.mkOption {
|
||||
default = "dashie";
|
||||
example = "us";
|
||||
type = lib.types.str;
|
||||
description = "Your layout";
|
||||
};
|
||||
variant = lib.mkOption {
|
||||
default = "";
|
||||
example = "";
|
||||
type = lib.types.str;
|
||||
description = "Your variant";
|
||||
};
|
||||
};
|
||||
config = (lib.optionalAttrs (options?services.xserver) {
|
||||
# Configure keymap in X11
|
||||
services.xserver = {
|
||||
xkb.layout = "${config.mods.xkb.layout}";
|
||||
xkb.variant = "${config.mods.xkb.variant}";
|
||||
};
|
||||
});
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue