mirror of
https://codeberg.org/jopejoe1/nix-conf.git
synced 2025-04-20 03:34:07 +02:00
get network interface name from hardware report
This commit is contained in:
parent
b4499da9e6
commit
1fd976dfd0
1 changed files with 7 additions and 2 deletions
|
@ -6,6 +6,9 @@
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
network_interface_name = (lib.elemAt config.facter.report.hardware.hardware.network_interface 0).unix_device_name;
|
||||||
|
in
|
||||||
{
|
{
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
|
@ -52,7 +55,9 @@
|
||||||
80
|
80
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
bridges.br0.interfaces = [ "enp41s0" ];
|
bridges.br0.interfaces = [
|
||||||
|
network_interface_name
|
||||||
|
];
|
||||||
useDHCP = false;
|
useDHCP = false;
|
||||||
interfaces."br0" = {
|
interfaces."br0" = {
|
||||||
useDHCP = true;
|
useDHCP = true;
|
||||||
|
@ -65,7 +70,7 @@
|
||||||
};
|
};
|
||||||
defaultGateway = {
|
defaultGateway = {
|
||||||
address = "192.168.100.1";
|
address = "192.168.100.1";
|
||||||
interface = "enp41s0";
|
interface = network_interface_name;
|
||||||
};
|
};
|
||||||
nameservers = [ "192.168.100.1" ];
|
nameservers = [ "192.168.100.1" ];
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue