derive domain from server type
This commit is contained in:
parent
bd5dc4b883
commit
a015290fcf
3 changed files with 6 additions and 18 deletions
|
@ -4,11 +4,7 @@
|
|||
type = "physical";
|
||||
|
||||
nixosModule = {
|
||||
networking = {
|
||||
hostName = "jefke";
|
||||
# TODO: generate this using type?
|
||||
domain = "hyp";
|
||||
};
|
||||
networking.hostName = "jefke";
|
||||
|
||||
lab = {
|
||||
terraformDatabase.enable = true;
|
||||
|
@ -34,10 +30,7 @@
|
|||
nixosModule = { config, ... }:
|
||||
let inherit (config.lab.networking) dmzServicesIPv4 dmzServicesIPv6; in
|
||||
{
|
||||
networking = {
|
||||
hostName = "atlas";
|
||||
domain = "hyp";
|
||||
};
|
||||
networking.hostName = "atlas";
|
||||
|
||||
lab = {
|
||||
networking = {
|
||||
|
@ -65,10 +58,7 @@
|
|||
type = "physical";
|
||||
|
||||
nixosModule = { pkgs, ... }: {
|
||||
networking = {
|
||||
hostName = "lewis";
|
||||
domain = "hyp";
|
||||
};
|
||||
networking.hostName = "lewis";
|
||||
|
||||
lab = {
|
||||
dataHost.enable = true;
|
||||
|
@ -96,10 +86,7 @@
|
|||
echo "Hello world from inside a virtual machine!!" | ${pkgs.lolcat}/bin/lolcat
|
||||
'';
|
||||
|
||||
networking = {
|
||||
hostName = "my-microvm";
|
||||
domain = "dmz";
|
||||
};
|
||||
networking.hostName = "my-microvm";
|
||||
|
||||
lab.vmMacAddress = "BA:DB:EE:F0:00:00";
|
||||
};
|
||||
|
|
|
@ -89,6 +89,7 @@ in {
|
|||
|
||||
config = {
|
||||
networking = {
|
||||
domain = if machine.type == "physical" then "hyp" else "dmz";
|
||||
nftables.enable = true;
|
||||
useDHCP = machine.type == "virtual";
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ pkgs, config, lib, modulesPath, machine, microvm, disko, agenix, machines, ... }: {
|
||||
{ pkgs, config, lib, modulesPath, microvm, disko, agenix, machines, ... }: {
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
microvm.nixosModules.host
|
||||
|
|
Loading…
Reference in a new issue