Reorganization
This commit is contained in:
parent
2821a76450
commit
aa3b8519f9
21 changed files with 241 additions and 204 deletions
72
config/common.nix
Normal file
72
config/common.nix
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
# 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";
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue