refactor: move host-specific settings to hosts directory
- Move defaultNameServers from network/dns.nix to hosts/servers/default.nix and hosts/workstations/default.nix - Move SMTP configuration from network/smtp.nix to hosts/servers/default.nix and hosts/workstations/default.nix - Move proxy configuration from network/proxy.nix to hosts/servers/default.nix and hosts/workstations/default.nix - Move NTP servers from network/time.nix to hosts/default.nix - Remove network/proxy.nix and network/smtp.nix (host-specific settings don't belong in network/) - Update network/default.nix to only import dns.nix and time.nix This refactoring separates environment-specific network parameters (domain, timezone) from host-specific settings (DNS servers, SMTP, proxy, NTP servers), making the configuration more logical and maintainable.
This commit is contained in:
@@ -11,6 +11,4 @@
|
||||
{
|
||||
dns = import ./dns.nix;
|
||||
time = import ./time.nix;
|
||||
proxy = import ./proxy.nix;
|
||||
smtp = import ./smtp.nix;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,9 +4,6 @@
|
||||
# Sample DNS configuration for the sample environment
|
||||
domain = "sample.lagraula.fr";
|
||||
|
||||
# Default DNS servers for this environment
|
||||
defaultNameServers = [ "10.40.128.10" ];
|
||||
|
||||
# Forwarders for this environment
|
||||
forwarders = [ "1.1.1.1" "8.8.8.8" ];
|
||||
|
||||
@@ -15,7 +12,4 @@
|
||||
|
||||
# Recursion policy
|
||||
recursion = "AllowOnlyForPrivateNetworks";
|
||||
|
||||
# Email for Let's Encrypt
|
||||
letsEncryptEmail = "xavier@lagraula.fr";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
# Proxy configuration for this environment
|
||||
# Currently no proxy is used — direct access for all hosts
|
||||
|
||||
workstations = {
|
||||
httpProxy = "";
|
||||
httpsProxy = "";
|
||||
noProxy = "";
|
||||
};
|
||||
|
||||
servers = {
|
||||
httpProxy = "";
|
||||
httpsProxy = "";
|
||||
noProxy = "";
|
||||
};
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
# SMTP relay configuration for this environment
|
||||
relayHost = "smtp.lagraula.fr";
|
||||
relayPort = 587;
|
||||
|
||||
useTLS = true;
|
||||
useSTARTTLS = true;
|
||||
|
||||
fromAddress = "noreply@sample.lagraula.fr";
|
||||
}
|
||||
@@ -1,15 +1,9 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
# NTP servers for this environment
|
||||
ntpServers = [
|
||||
"10.10.128.1" # IPv4 gateway
|
||||
"fd00::1" # IPv6 gateway
|
||||
];
|
||||
|
||||
# Time zone
|
||||
# Time zone for this environment
|
||||
timeZone = "Europe/Paris";
|
||||
|
||||
# Hardware clock setting
|
||||
hardwareClock = "UTC";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user