2023-08-26 14:01:58 +02:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}: let
|
|
|
|
inherit
|
|
|
|
(lib)
|
|
|
|
mkOption
|
|
|
|
types
|
|
|
|
;
|
|
|
|
in {
|
|
|
|
options.node = {
|
|
|
|
name = mkOption {
|
2023-09-26 22:25:58 +02:00
|
|
|
description = "A unique name for this node (host) in the repository. Defines the default hostname, but this can be overwritten.";
|
2023-08-26 14:01:58 +02:00
|
|
|
type = types.str;
|
|
|
|
};
|
|
|
|
|
|
|
|
secretsDir = mkOption {
|
2023-09-26 22:25:58 +02:00
|
|
|
description = "Path to the secrets directory for this node.";
|
2023-08-26 14:01:58 +02:00
|
|
|
type = types.path;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
config = {
|
|
|
|
networking.hostName = config.node.name;
|
|
|
|
};
|
|
|
|
}
|