create global module for machine-independent custom configuration

parameterize various IP addresses
This commit is contained in:
Pim Kunis 2024-01-08 23:17:37 +01:00
parent b189d061cb
commit efe9b57867
9 changed files with 90 additions and 49 deletions

View file

@ -23,23 +23,27 @@
name = "atlas";
hostName = "atlas.hyp";
nixosModule.lab = {
networking = {
staticDMZIpv4Address = "192.168.30.7/24";
dmzServices.enable = true;
};
nixosModule = { config, ... }:
let inherit (config.lab.networking) dmzDHCPIPv4; in
{
lab = {
networking = {
staticDMZIpv4Address = "${dmzDHCPIPv4}/24";
dmzServices.enable = true;
};
storage = {
osDisk = "/dev/sda";
dataPartition = "/dev/nvme0n1p1";
};
storage = {
osDisk = "/dev/sda";
dataPartition = "/dev/nvme0n1p1";
};
ssh = {
useCertificates = true;
hostCert = builtins.readFile ./atlas_host_ed25519-cert.pub;
userCert = builtins.readFile ./atlas_user_ed25519-cert.pub;
ssh = {
useCertificates = true;
hostCert = builtins.readFile ./atlas_host_ed25519-cert.pub;
userCert = builtins.readFile ./atlas_user_ed25519-cert.pub;
};
};
};
};
};
lewis = {