48 lines
913 B
Nix
48 lines
913 B
Nix
{
|
|
lib,
|
|
config,
|
|
...
|
|
}: let
|
|
inherit
|
|
(lib)
|
|
mkOption
|
|
types
|
|
;
|
|
in {
|
|
options.marleyos.my = rec {
|
|
name = mkOption {
|
|
type = with types; str;
|
|
default = config.snowfallorg.user.name or "marley";
|
|
description = "Your username, for use as your login name.";
|
|
};
|
|
|
|
username = mkOption {
|
|
type = with types; str;
|
|
default = name;
|
|
description = "Your username, for external profiles.";
|
|
};
|
|
|
|
fullName = mkOption {
|
|
type = with types; str;
|
|
default = name;
|
|
description = "Your full name, for display purposes.";
|
|
};
|
|
|
|
email = mkOption {
|
|
type = with 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.";
|
|
}
|
|
];
|
|
};
|
|
}
|