diff --git a/modules/meta/default.nix b/modules/meta/default.nix new file mode 100644 index 0000000..417e545 --- /dev/null +++ b/modules/meta/default.nix @@ -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 = { }; + }; + +}