refactor: lib, flake.nix

This commit is contained in:
Leon Schwarzäugl 2024-12-28 23:59:43 +01:00
parent a0f4384034
commit b71bb5794a
Signed by: swarsel
GPG key ID: 26A54C31F2A4FD84
27 changed files with 540 additions and 706 deletions

View file

@ -1,14 +1,11 @@
{ lib, config, ... }:
let
inherit (lib) mkOption types;
in
{
options.swarselsystems.inputs = mkOption {
type = types.attrsOf (types.attrsOf types.str);
options.swarselsystems.inputs = lib.mkOption {
type = lib.types.attrsOf (lib.types.attrsOf lib.types.str);
default = { };
};
options.swarselsystems.kyria = mkOption {
type = types.attrsOf (types.attrsOf types.str);
options.swarselsystems.kyria = lib.mkOption {
type = lib.types.attrsOf (lib.types.attrsOf lib.types.str);
default = {
"36125:53060:splitkb.com_splitkb.com_Kyria_rev3" = {
xkb_layout = "us";
@ -20,21 +17,21 @@ in
};
};
};
options.swarselsystems.touchpad = mkOption {
type = types.attrsOf (types.attrsOf types.str);
options.swarselsystems.touchpad = lib.mkOption {
type = lib.types.attrsOf (lib.types.attrsOf lib.types.str);
default = { };
};
options.swarselsystems.standardinputs = mkOption {
type = types.attrsOf (types.attrsOf types.str);
options.swarselsystems.standardinputs = lib.mkOption {
type = lib.types.attrsOf (lib.types.attrsOf lib.types.str);
default = lib.recursiveUpdate (lib.recursiveUpdate config.swarselsystems.touchpad config.swarselsystems.kyria) config.swarselsystems.inputs;
internal = true;
};
options.swarselsystems.keybindings = mkOption {
type = types.attrsOf types.str;
options.swarselsystems.keybindings = lib.mkOption {
type = lib.types.attrsOf lib.types.str;
default = { };
};
options.swarselsystems.shellAliases = mkOption {
type = types.attrsOf types.str;
options.swarselsystems.shellAliases = lib.mkOption {
type = lib.types.attrsOf lib.types.str;
default = { };
};
}