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
|
||||
rawServices = [
|
||||
{
|
||||
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";
|
||||
}
|
||||
];
|
||||
# Import shared data (also used by terranix)
|
||||
sharedData = import ../data/services.nix;
|
||||
|
||||
# Enrich services with host IP information
|
||||
enrichServices = hosts: services:
|
||||
|
|
@ -115,17 +88,9 @@ in
|
|||
};
|
||||
|
||||
config.flake = {
|
||||
hosts = {
|
||||
alexandria = {
|
||||
lanIP = "192.168.15.142";
|
||||
tailscaleIP = "100.76.19.50";
|
||||
};
|
||||
trantor = {
|
||||
tailscaleIP = "100.108.5.90";
|
||||
};
|
||||
};
|
||||
hosts = sharedData.hosts;
|
||||
|
||||
services = enrichServices config.flake.hosts rawServices;
|
||||
services = enrichServices config.flake.hosts sharedData.services;
|
||||
|
||||
lib = {
|
||||
# Nginx virtual host utilities
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue