mirror of
https://github.com/JulienMalka/snowfield.git
synced 2025-04-01 09:40:55 +02:00
feat: add meta module
This commit is contained in:
parent
c4c476f56e
commit
b6480b72ec
1 changed files with 43 additions and 0 deletions
43
modules/meta/default.nix
Normal file
43
modules/meta/default.nix
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
{
|
||||||
|
options.machine.meta = lib.mkOption {
|
||||||
|
description = "Machine metadata";
|
||||||
|
type =
|
||||||
|
with lib;
|
||||||
|
types.submodule (
|
||||||
|
{ name, ... }:
|
||||||
|
{
|
||||||
|
freeformType =
|
||||||
|
with types;
|
||||||
|
oneOf [
|
||||||
|
str
|
||||||
|
attrs
|
||||||
|
];
|
||||||
|
options = {
|
||||||
|
hostname = mkOption {
|
||||||
|
description = "The machine's hostname";
|
||||||
|
type = types.str;
|
||||||
|
default = name;
|
||||||
|
readOnly = true;
|
||||||
|
};
|
||||||
|
sshPort = mkOption {
|
||||||
|
description = "The port for the ssh server of the machine";
|
||||||
|
type = types.int;
|
||||||
|
default = 45;
|
||||||
|
};
|
||||||
|
sshUser = mkOption {
|
||||||
|
description = "The user for ssh connection to the machine";
|
||||||
|
default = "julien";
|
||||||
|
};
|
||||||
|
tld = mkOption {
|
||||||
|
description = "tld for local addressing of the machine";
|
||||||
|
default = "luj";
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
);
|
||||||
|
default = { };
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue