added hostname configuration

This commit is contained in:
2026-07-06 13:12:19 -05:00
parent a0b0f7701a
commit 0b4d797202
3 changed files with 10 additions and 1 deletions
+2
View File
@@ -11,7 +11,9 @@
];
homelab = {
core = {
hostname = "test";
kernel = "lts";
};
+2 -1
View File
@@ -9,8 +9,9 @@ let
allowRootSSH = if cfg.ssh.permitRootLogin then "yes" else "no";
in
{
config = {
networking.hostName = cfg.hostname;
boot = {
kernelPackages = shared.kernelOptions.${cfg.kernel};
loader = {
+6
View File
@@ -5,6 +5,12 @@
}:
{
options.homelab.core = {
hostname = lib.mkOption {
type = lib.types.str;
default = "nixos";
description = "Hostname of the machine";
};
kernel = lib.mkOption {
type = with lib.types; enum (builtins.attrNames shared.kernelOptions);
default = "lts";