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 = [
|
||||
|
@ -52,7 +55,9 @@
|
|||
80
|
||||
];
|
||||
};
|
||||
bridges.br0.interfaces = [ "enp41s0" ];
|
||||
bridges.br0.interfaces = [
|
||||
network_interface_name
|
||||
];
|
||||
useDHCP = false;
|
||||
interfaces."br0" = {
|
||||
useDHCP = true;
|
||||
|
@ -65,7 +70,7 @@
|
|||
};
|
||||
defaultGateway = {
|
||||
address = "192.168.100.1";
|
||||
interface = "enp41s0";
|
||||
interface = network_interface_name;
|
||||
};
|
||||
nameservers = [ "192.168.100.1" ];
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue