diff --git a/modules/node.nix b/modules/node.nix new file mode 100644 index 0000000..ce90148 --- /dev/null +++ b/modules/node.nix @@ -0,0 +1,22 @@ +{ + config, + lib, + ... +}: let + inherit + (lib) + mkOption + types + ; +in { + options.node = { + name = mkOption { + description = "A unique name for this node (host) in the repository. Defines the default hostname, but this can be overwritten."; + type = types.str; + }; + }; + + config = { + networking.hostName = config.node.name; + }; +}