diff --git a/components/config/config.c b/components/config/config.c index f06ea3f..1c65c89 100644 --- a/components/config/config.c +++ b/components/config/config.c @@ -33,7 +33,10 @@ typedef struct { } Item; static Item state[ITEM_COUNT] = { - [HOSTNAME] = { .id = "hostname", .default_value = "bedside-clock" }, + [HOSTNAME] = { + .id = "hostname", + .default_value = CONFIG_DEFAULT_HOSTNAME, + }, }; static bool load(ItemIndex item) diff --git a/main/Kconfig.projbuild b/main/Kconfig.projbuild new file mode 100644 index 0000000..7194f29 --- /dev/null +++ b/main/Kconfig.projbuild @@ -0,0 +1,6 @@ +menu "Bedside clock settings" + config DEFAULT_HOSTNAME + string "The default hostname for the device" + default "bedside-clock" + prompt "Default hostname" +endmenu