feat: derive desktop input and SDDM scale from host metadata
This commit is contained in:
@@ -1,5 +1,12 @@
|
||||
{ lib, ... }:
|
||||
let
|
||||
mkNullableOption =
|
||||
type:
|
||||
lib.mkOption {
|
||||
inherit type;
|
||||
default = null;
|
||||
};
|
||||
|
||||
emailType = lib.types.submodule (
|
||||
{ ... }:
|
||||
{
|
||||
@@ -100,6 +107,73 @@ let
|
||||
}
|
||||
);
|
||||
|
||||
mouseInputType = lib.types.submodule (
|
||||
{ ... }:
|
||||
{
|
||||
options = {
|
||||
accelProfile = mkNullableOption (lib.types.nullOr (lib.types.enum [
|
||||
"adaptive"
|
||||
"flat"
|
||||
]));
|
||||
accelSpeed = mkNullableOption (lib.types.nullOr lib.types.float);
|
||||
leftHanded = mkNullableOption (lib.types.nullOr lib.types.bool);
|
||||
middleEmulation = mkNullableOption (lib.types.nullOr lib.types.bool);
|
||||
naturalScrolling = mkNullableOption (lib.types.nullOr lib.types.bool);
|
||||
scrollMethod = mkNullableOption (lib.types.nullOr (lib.types.enum [
|
||||
"no-scroll"
|
||||
"two-finger"
|
||||
"edge"
|
||||
"on-button-down"
|
||||
]));
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
touchpadInputType = lib.types.submodule (
|
||||
{ ... }:
|
||||
{
|
||||
options = {
|
||||
accelProfile = mkNullableOption (lib.types.nullOr (lib.types.enum [
|
||||
"adaptive"
|
||||
"flat"
|
||||
]));
|
||||
accelSpeed = mkNullableOption (lib.types.nullOr lib.types.float);
|
||||
clickMethod = mkNullableOption (lib.types.nullOr (lib.types.enum [
|
||||
"button-areas"
|
||||
"clickfinger"
|
||||
]));
|
||||
disableWhileTyping = mkNullableOption (lib.types.nullOr lib.types.bool);
|
||||
leftHanded = mkNullableOption (lib.types.nullOr lib.types.bool);
|
||||
middleEmulation = mkNullableOption (lib.types.nullOr lib.types.bool);
|
||||
naturalScrolling = mkNullableOption (lib.types.nullOr lib.types.bool);
|
||||
scrollMethod = mkNullableOption (lib.types.nullOr (lib.types.enum [
|
||||
"no-scroll"
|
||||
"two-finger"
|
||||
"edge"
|
||||
"on-button-down"
|
||||
]));
|
||||
tapping = mkNullableOption (lib.types.nullOr lib.types.bool);
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
inputType = lib.types.submodule (
|
||||
{ ... }:
|
||||
{
|
||||
options = {
|
||||
mouse = lib.mkOption {
|
||||
type = mouseInputType;
|
||||
default = { };
|
||||
};
|
||||
|
||||
touchpad = lib.mkOption {
|
||||
type = touchpadInputType;
|
||||
default = { };
|
||||
};
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
hostType = lib.types.submodule (
|
||||
{ ... }:
|
||||
{
|
||||
@@ -113,6 +187,11 @@ let
|
||||
default = { };
|
||||
};
|
||||
|
||||
input = lib.mkOption {
|
||||
type = inputType;
|
||||
default = { };
|
||||
};
|
||||
|
||||
users = lib.mkOption {
|
||||
type = lib.types.attrsOf userType;
|
||||
default = { };
|
||||
|
||||
Reference in New Issue
Block a user