constants: import hosts/services from data/services.nix
Eliminates duplication by using data/services.nix as single source of truth for both flake-parts modules and terranix. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
bde5e2aabc
commit
1b7ea7e59b
1 changed files with 4 additions and 39 deletions
|
|
@ -50,35 +50,8 @@ let
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# Raw services list before enrichment
|
# Import shared data (also used by terranix)
|
||||||
rawServices = [
|
sharedData = import ../data/services.nix;
|
||||||
{
|
|
||||||
name = "kanidm";
|
|
||||||
domain = "auth.baduhai.dev";
|
|
||||||
host = "alexandria";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "vaultwarden";
|
|
||||||
domain = "pass.baduhai.dev";
|
|
||||||
host = "alexandria";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "forgejo";
|
|
||||||
domain = "git.baduhai.dev";
|
|
||||||
host = "trantor";
|
|
||||||
public = true;
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "nextcloud";
|
|
||||||
domain = "cloud.baduhai.dev";
|
|
||||||
host = "alexandria";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "jellyfin";
|
|
||||||
domain = "jellyfin.baduhai.dev";
|
|
||||||
host = "alexandria";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
# Enrich services with host IP information
|
# Enrich services with host IP information
|
||||||
enrichServices = hosts: services:
|
enrichServices = hosts: services:
|
||||||
|
|
@ -115,17 +88,9 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
config.flake = {
|
config.flake = {
|
||||||
hosts = {
|
hosts = sharedData.hosts;
|
||||||
alexandria = {
|
|
||||||
lanIP = "192.168.15.142";
|
|
||||||
tailscaleIP = "100.76.19.50";
|
|
||||||
};
|
|
||||||
trantor = {
|
|
||||||
tailscaleIP = "100.108.5.90";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
services = enrichServices config.flake.hosts rawServices;
|
services = enrichServices config.flake.hosts sharedData.services;
|
||||||
|
|
||||||
lib = {
|
lib = {
|
||||||
# Nginx virtual host utilities
|
# Nginx virtual host utilities
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue