added hostname configuration
This commit is contained in:
@@ -11,7 +11,9 @@
|
|||||||
];
|
];
|
||||||
|
|
||||||
homelab = {
|
homelab = {
|
||||||
|
|
||||||
core = {
|
core = {
|
||||||
|
hostname = "test";
|
||||||
kernel = "lts";
|
kernel = "lts";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -9,8 +9,9 @@ let
|
|||||||
allowRootSSH = if cfg.ssh.permitRootLogin then "yes" else "no";
|
allowRootSSH = if cfg.ssh.permitRootLogin then "yes" else "no";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
|
networking.hostName = cfg.hostname;
|
||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
kernelPackages = shared.kernelOptions.${cfg.kernel};
|
kernelPackages = shared.kernelOptions.${cfg.kernel};
|
||||||
loader = {
|
loader = {
|
||||||
|
|||||||
@@ -5,6 +5,12 @@
|
|||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
options.homelab.core = {
|
options.homelab.core = {
|
||||||
|
hostname = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
default = "nixos";
|
||||||
|
description = "Hostname of the machine";
|
||||||
|
};
|
||||||
|
|
||||||
kernel = lib.mkOption {
|
kernel = lib.mkOption {
|
||||||
type = with lib.types; enum (builtins.attrNames shared.kernelOptions);
|
type = with lib.types; enum (builtins.attrNames shared.kernelOptions);
|
||||||
default = "lts";
|
default = "lts";
|
||||||
|
|||||||
Reference in New Issue
Block a user