2024-12-20 13:10:11 +00:00
|
|
|
{
|
|
|
|
inputs,
|
|
|
|
pkgs,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}:
|
2024-12-09 01:15:55 +00:00
|
|
|
let
|
2024-12-17 12:10:05 +00:00
|
|
|
def = {
|
|
|
|
default = false;
|
|
|
|
};
|
|
|
|
null = {
|
|
|
|
default = null;
|
|
|
|
};
|
|
|
|
in
|
2024-12-20 13:10:11 +00:00
|
|
|
with lib;
|
|
|
|
with lib.types;
|
2024-12-21 09:11:03 +00:00
|
|
|
{
|
|
|
|
# ylib & stylix
|
|
|
|
umport = inputs.nypkgs.legacyPackages.${pkgs.system}.lib.umport;
|
2024-12-09 01:15:55 +00:00
|
|
|
# enable = true; ++ enable = false;
|
2024-12-17 12:10:05 +00:00
|
|
|
True = {
|
|
|
|
enable = true;
|
|
|
|
};
|
|
|
|
False = {
|
|
|
|
enable = false;
|
|
|
|
};
|
2024-12-09 01:15:55 +00:00
|
|
|
# mkOption and mkEnableOption
|
|
|
|
mkEnable = mkEnableOption "";
|
2024-12-17 12:10:05 +00:00
|
|
|
mkBool = mkOption def // {
|
|
|
|
type = bool;
|
|
|
|
};
|
2024-12-09 01:15:55 +00:00
|
|
|
mkOpt = {
|
2024-12-17 12:10:05 +00:00
|
|
|
str = mkOption def // {
|
|
|
|
type = str;
|
|
|
|
};
|
2024-12-09 01:15:55 +00:00
|
|
|
list = {
|
2024-12-17 12:10:05 +00:00
|
|
|
pkgs = mkOption null // {
|
|
|
|
type = listOf package;
|
|
|
|
};
|
|
|
|
str = mkOption null // {
|
|
|
|
type = listOf str;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
attrs = {
|
|
|
|
str = mkOption null // {
|
|
|
|
type = attrsOf str;
|
|
|
|
};
|
2024-12-09 01:15:55 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|