mirror of
https://git.sr.ht/~neverness/ultima
synced 2025-01-19 23:53:51 +00:00
58 lines
906 B
Nix
58 lines
906 B
Nix
{
|
|
inputs,
|
|
pkgs,
|
|
lib,
|
|
...
|
|
}:
|
|
let
|
|
def = {
|
|
default = false;
|
|
};
|
|
null = {
|
|
default = null;
|
|
};
|
|
in
|
|
with lib;
|
|
with lib.types;
|
|
{
|
|
# ylib & stylix
|
|
umport = inputs.nypkgs.legacyPackages.${pkgs.system}.lib.umport;
|
|
imports = {
|
|
exclude = [ ./default.nix ];
|
|
path = ./.;
|
|
};
|
|
# enable = true; ++ enable = false;
|
|
True = {
|
|
enable = true;
|
|
};
|
|
False = {
|
|
enable = false;
|
|
};
|
|
# mkOption and mkEnableOption
|
|
mkEnable = mkEnableOption "";
|
|
mkBool = mkOption def // {
|
|
type = bool;
|
|
};
|
|
mkOpt = {
|
|
str = mkOption def // {
|
|
type = str;
|
|
};
|
|
lines = mkOption null // {
|
|
type = nullOr lines;
|
|
};
|
|
list = {
|
|
pkgs = mkOption null // {
|
|
type = listOf package;
|
|
};
|
|
str = mkOption null // {
|
|
type = listOf str;
|
|
};
|
|
};
|
|
attrs = {
|
|
str = mkOption null // {
|
|
type = attrsOf str;
|
|
};
|
|
};
|
|
};
|
|
}
|