feat: update sample environment to match nixos-infra structure
- Add network/dns.nix, network/time.nix, network/proxy.nix, network/smtp.nix - Add network/default.nix to import all network files - Add hosts/default.nix, hosts/servers/default.nix, hosts/workstations/default.nix - These placeholders match the structure in nixos-infra for consistency The sample environment now reflects the same organization as production, dev, and stage environments, making it easier to use as a reference.
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
# Central network data source for the sample environment.
|
||||
#
|
||||
# Usage from a configuration.nix:
|
||||
# network = import ../../network { };
|
||||
# network.dns.domain → "sample.lagraula.fr"
|
||||
# network.time.timeZone → "Europe/Paris"
|
||||
#
|
||||
# Usage from a shell script (via `nix eval`):
|
||||
# nix eval --json -f network/default.nix dns
|
||||
|
||||
{
|
||||
dns = import ./dns.nix;
|
||||
time = import ./time.nix;
|
||||
proxy = import ./proxy.nix;
|
||||
smtp = import ./smtp.nix;
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
# 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" ];
|
||||
|
||||
# Allow zone transfers (none in sample)
|
||||
allowZoneTransfer = [ ];
|
||||
|
||||
# Recursion policy
|
||||
recursion = "AllowOnlyForPrivateNetworks";
|
||||
|
||||
# Email for Let's Encrypt
|
||||
letsEncryptEmail = "xavier@lagraula.fr";
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
{ 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 = "";
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
# SMTP relay configuration for this environment
|
||||
relayHost = "smtp.lagraula.fr";
|
||||
relayPort = 587;
|
||||
|
||||
useTLS = true;
|
||||
useSTARTTLS = true;
|
||||
|
||||
fromAddress = "noreply@sample.lagraula.fr";
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
# NTP servers for this environment
|
||||
ntpServers = [
|
||||
"10.10.128.1" # IPv4 gateway
|
||||
"fd00::1" # IPv6 gateway
|
||||
];
|
||||
|
||||
# Time zone
|
||||
timeZone = "Europe/Paris";
|
||||
|
||||
# Hardware clock setting
|
||||
hardwareClock = "UTC";
|
||||
}
|
||||
Reference in New Issue
Block a user