add derived isPhysical and isVirtual values for machines
This commit is contained in:
parent
960d3f6075
commit
0fe9aef9f5
6 changed files with 20 additions and 9 deletions
|
@ -48,7 +48,7 @@ in {
|
|||
|
||||
config = {
|
||||
networking = {
|
||||
domain = if machine.kind == "physical" then "hyp" else "dmz";
|
||||
domain = if machine.isPhysical then "hyp" else "dmz";
|
||||
nftables.enable = true;
|
||||
useDHCP = false;
|
||||
|
||||
|
@ -117,7 +117,7 @@ in {
|
|||
networkConfig.Bridge = cfg.dmz.bridgeName;
|
||||
};
|
||||
})
|
||||
(lib.optionalAttrs (machine.kind == "virtual") {
|
||||
(lib.optionalAttrs machine.isVirtual {
|
||||
"30-main-nic" = {
|
||||
matchConfig.Name = "en*";
|
||||
|
||||
|
|
Reference in a new issue