mirror of
https://github.com/oddlama/nixos-extra-modules.git
synced 2025-10-10 13:50:39 +02:00
feat: add node name option
This commit is contained in:
parent
7013e9116d
commit
6e0ea91254
1 changed files with 22 additions and 0 deletions
22
modules/node.nix
Normal file
22
modules/node.nix
Normal file
|
@ -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;
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue