Homelab/config/common.nix
2025-10-04 00:49:49 +00:00

72 lines
No EOL
1.8 KiB
Nix

# Common configuration options used across modules
{ lib, ... }:
{
options.homelab = {
domain = lib.mkOption {
type = lib.types.str;
default = "per-aspera.space";
description = "Primary domain for the homelab";
};
user = lib.mkOption {
type = lib.types.str;
default = "lucas";
description = "Primary user for the homelab";
};
networking = {
interface = lib.mkOption {
type = lib.types.str;
default = "enp0s31f6";
description = "Primary network interface";
};
staticIP = lib.mkOption {
type = lib.types.str;
default = "192.168.0.10";
description = "Static IP address";
};
gateway = lib.mkOption {
type = lib.types.str;
default = "192.168.0.1";
description = "Default gateway";
};
nameservers = lib.mkOption {
type = lib.types.listOf lib.types.str;
default = [ "205.171.3.25" "8.8.8.8" ];
description = "DNS nameservers";
};
};
aws = {
hostedZoneId = lib.mkOption {
type = lib.types.str;
default = "Z09728753LLLNSYFXIBIM";
description = "AWS Route53 hosted zone ID";
};
};
mediaGroup = lib.mkOption {
type = lib.types.str;
default = "multimedia";
description = "Group name for media access";
};
};
# Set default configuration values
config.homelab = {
domain = "per-aspera.space";
user = "lucas";
networking = {
interface = "enp0s31f6";
staticIP = "192.168.0.10";
gateway = "192.168.0.1";
nameservers = [ "205.171.3.25" "8.8.8.8" ];
};
aws.hostedZoneId = "Z09728753LLLNSYFXIBIM";
mediaGroup = "multimedia";
};
}