42 lines
889 B
Nix
42 lines
889 B
Nix
{
|
|
lib,
|
|
config,
|
|
...
|
|
}: {
|
|
options.marleyos.my = rec {
|
|
name = lib.mkOption {
|
|
type = with lib.types; str;
|
|
default = config.snowfallorg.user.name or "marley";
|
|
description = "Your username, for use as your login name.";
|
|
};
|
|
|
|
username = lib.mkOption {
|
|
type = with lib.types; str;
|
|
default = name;
|
|
description = "Your username, for external profiles.";
|
|
};
|
|
|
|
fullName = lib.mkOption {
|
|
type = with lib.types; str;
|
|
default = name;
|
|
description = "Your full name, for display purposes.";
|
|
};
|
|
|
|
email = lib.mkOption {
|
|
type = with lib.types; nullOr str;
|
|
default = null;
|
|
description = "Your email";
|
|
};
|
|
};
|
|
|
|
config = let
|
|
cfg = config.marleyos.my;
|
|
in {
|
|
assertions = [
|
|
{
|
|
assertion = cfg.name != null;
|
|
message = "marleyos.my.name must be set.";
|
|
}
|
|
];
|
|
};
|
|
}
|