modules: hardware: move 'networking'
This commit is contained in:
parent
abbe1bb203
commit
5f0c1f6a79
|
@ -15,9 +15,11 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
my.hardware.networking = {
|
||||||
# Which interface is used to connect to the internet
|
# Which interface is used to connect to the internet
|
||||||
my.networking.externalInterface = "enp0s3";
|
externalInterface = "enp0s3";
|
||||||
|
|
||||||
# Enable WiFi integration
|
# Enable WiFi integration
|
||||||
my.networking.wireless.enable = true;
|
wireless.enable = true;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,5 +31,5 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
# Which interface is used to connect to the internet
|
# Which interface is used to connect to the internet
|
||||||
my.networking.externalInterface = "eth0";
|
my.hardware.networking.externalInterface = "eth0";
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
./home.nix
|
./home.nix
|
||||||
./language.nix
|
./language.nix
|
||||||
./media.nix
|
./media.nix
|
||||||
./networking.nix
|
|
||||||
./nix.nix
|
./nix.nix
|
||||||
./packages.nix
|
./packages.nix
|
||||||
./sound.nix
|
./sound.nix
|
||||||
|
|
|
@ -5,5 +5,6 @@
|
||||||
imports = [
|
imports = [
|
||||||
./bluetooth.nix
|
./bluetooth.nix
|
||||||
./ergodox.nix
|
./ergodox.nix
|
||||||
|
./networking.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
{ config, lib, ... }:
|
{ config, lib, ... }:
|
||||||
let
|
let
|
||||||
cfg = config.my.networking;
|
cfg = config.my.hardware.networking;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.my.networking = with lib; {
|
options.my.hardware.networking = with lib; {
|
||||||
externalInterface = mkOption {
|
externalInterface = mkOption {
|
||||||
type = types.nullOr types.str;
|
type = types.nullOr types.str;
|
||||||
default = null;
|
default = null;
|
||||||
|
|
|
@ -18,7 +18,7 @@ let
|
||||||
in
|
in
|
||||||
lib.filterAttrs shouldConnectToPeer allOthers;
|
lib.filterAttrs shouldConnectToPeer allOthers;
|
||||||
|
|
||||||
extIface = config.my.networking.externalInterface;
|
extIface = config.my.hardware.networking.externalInterface;
|
||||||
|
|
||||||
mkInterface = clientAllowedIPs: {
|
mkInterface = clientAllowedIPs: {
|
||||||
listenPort = cfg.port;
|
listenPort = cfg.port;
|
||||||
|
|
Loading…
Reference in a new issue