1
0
Fork 0
mirror of https://git.sr.ht/~neverness/ultima synced 2024-12-29 02:43:53 +00:00
ultima/libx/options.nix

53 lines
834 B
Nix
Raw Normal View History

2024-12-20 13:10:11 +00:00
{
2024-12-21 09:11:03 +00:00
theme,
2024-12-20 13:10:11 +00:00
inputs,
pkgs,
lib,
...
}:
2024-12-09 01:15:55 +00:00
let
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;
base16 = "${inputs.design}/base16/${theme}.yaml";
2024-12-09 01:15:55 +00:00
# enable = true; ++ enable = false;
True = {
enable = true;
};
False = {
enable = false;
};
2024-12-09 01:15:55 +00:00
# mkOption and mkEnableOption
mkEnable = mkEnableOption "";
mkBool = mkOption def // {
type = bool;
};
2024-12-09 01:15:55 +00:00
mkOpt = {
str = mkOption def // {
type = str;
};
2024-12-09 01:15:55 +00:00
list = {
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
};
};
}