flocon/modules/options/systemVars.nix
Anthony Rodriguez 559f99cfde
options: provide defaults for user and fullName
This fixes users not being present, even on the server. We have to
create a placeholder user, even if we're only going to ssh as root.
2025-02-06 15:21:22 +01:00

30 lines
565 B
Nix

{
lib,
options,
...
}: let
inherit (lib) mkOption;
inherit (lib.types) str;
in {
options.local.systemVars = {
hostName = mkOption {
type = str;
description = "hostname for the current host";
default = null;
};
username = mkOption {
type = str;
description = "username for the home directory";
default = "user";
};
};
config.assertions = [
{
assertion = options.local.systemVars.hostName.isDefined;
}
{
assertion = options.local.systemVars.username.isDefined;
}
];
}