blade-torres: remap en-storage onto a vlan

This commit is contained in:
Luke Granger-Brown 2021-03-14 15:52:53 +00:00
parent 7273c31af5
commit 22dadde50a
2 changed files with 11 additions and 2 deletions

View file

@ -16,12 +16,20 @@ in {
networking = {
hostName = "blade-torres";
hostId = "86db1d9c";
# HACK: torres' secondary intf. seems to be having problems
# temporarily remap this onto the VLANs with everything else.
vlans.en-storage = {
id = 101;
interface = "en-int";
};
};
my.ip.tailscale = "100.92.118.36";
my.blade.bay = 8;
my.blade.macAddress = {
internal = "e4:11:5b:ac:e3:cc";
storage = "e4:11:5b:ac:e3:d0";
storage = null;
#storage = "e4:11:5b:ac:e3:d0";
};
services.ceph = {

View file

@ -18,7 +18,7 @@ in {
type = lib.types.str;
};
macAddress.storage = lib.mkOption {
type = lib.types.str;
type = lib.types.nullOr lib.types.str;
};
macAddress.internet = lib.mkOption {
type = lib.types.nullOr lib.types.str;
@ -97,6 +97,7 @@ in {
};
services.udev.extraRules = ''
ATTR{address}=="${config.my.blade.macAddress.internal}", NAME="en-int"
'' + (lib.optionalString (config.my.blade.macAddress.storage != null) ''
ATTR{address}=="${config.my.blade.macAddress.storage}", NAME="en-storage"
'' + (lib.optionalString (config.my.blade.macAddress.internet != null) ''
ATTR{address}=="${config.my.blade.macAddress.internet}", NAME="en-internet"